skip to Main Content

Laravel 8: create two different default app file

In the application there is column type where the type are: Users and Admin. I want to separate the app file of users to admin. I already edited the file of AuthenticatedSessionController if($user_details->type != 0) { return redirect()->intended(RouteServiceProvider::HOME); }else{ return…

VIEW QUESTION

Laravel Timestamp Validation

I want to make sure that the receiving data is a valid timestamp. is there a way to make sure starts_at and expired_at fields are timestamps? $rules = [ 'user_id' => 'required|int|exists:users,id', 'starts_at' => 'required|int|min:1', 'expires_at' => 'required|int|gt:starts_at', ];

VIEW QUESTION

why laravel say table dosent exsit

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'app.infos' doesn't exist. home controller <?php namespace AppHttpControllers; // use IlluminateHttpRequest; use AppHttpControllersController; use AppModelsinfo; class homeController extends Controller { public function index(){ $data=info::all(); return view('home',['data'=>$data]); } } web php Route::get('home',…

VIEW QUESTION
Back To Top
Search