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

419 page expired error in laravel form submission even after adding csrf

View: <form action="/checklogin" method="post" enctype="multipart/form-data" class="account-form" id="login_form_order_page"> {{ csrf_field() }} <div class="error-wrap"></div> <div class="form-group"> <input type="text" name="email" class="form-control" placeholder="Email*" required> </div> <div class="form-group"> <input type="password" name="password" class="form-control" placeholder="Password*" required> </div> <div class="form-group btn-wrapper"> <button type="submit" id="login_btn" class="submit-btn">Login</button> </div> <div class="row…

VIEW QUESTION
Back To Top
Search