Author Archives: Admin

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 namespace App\Models; instead of namespace App.

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();