Category Archives: Laravel

Flash message in Laravel-Show flash message in different ways in laravel

flash message in laravel 5.4 How to display a message in laravel after successfull completion of a form post. Create Controller EmployeeController

Viewpage blade code will be ..

Update a mysql database field with empty value in laravel

Below code explains how to update a db field with null value using Laravel create a database called tbl_employee with few fields as follows.for creating the table you can use the below sql statement.

Created one controller UpdateController and one model called Employee model UpdateController


ErrorException in TestController.php line 31: Undefined variable: request In Lumen

In my TestController.php while accessing a model function it is throwing the error Solution:

CSRF protection in Laravel

CSRF-TOKEN CSRF is an attack using unauthorized command done on behalf of an authorized user. Including csrf token in a form its in a hidden format,so that middleware can validate the request. Laravel automatically generates the csrf token for each active session.This token is used to verify each authenticated user is making the request Method… Read More »

FatalThrowableError in Controller.php line 24: Class ‘App\Models\Users’ not found In Lumen

Scenario:While setting Lumen in local testing environment, create a new folder Models inside app this time if we try to display db records using Eloquent method getting the above mentioned error. Solution: In the model file by default namespace/App will be there becuase of this it is throwing error.So please add the below change use… Read More »

FatalThrowableError in Users.php line 43: Class ‘DB’ not found Lumen

Getting Error in Lumen framework while configuring the lumen in my local testing environment Solution: In the bootstrap/ folder edit the file app.php and uncomment the below line // $app->withFacades();