skip to Main Content

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

Pass variable to view via controller in Laravel

I need help with passing the variable I have initialized using __construct() to view in Laravel. Here is my controller code protected $profileInfo; public function __construct(){ $this->profileInfo = Profile::with('address')->where('id', '=', '1')->get(); } public function index(){ $this->profileInfo; return view('admin_pages.profile', compact('profileInfo')); }…

VIEW QUESTION
Back To Top
Search