I though I was clever to organise all the DB models into the folder as per Laravel 8 which I am running on my project...
What I did is :
- create the folder and move all the models into so now i.e. Articles.php is inside the app/Models folder
- add "namespace App\models;" in each model file
- replace all the instance of "use App\Article;" by "use App\Models\Article;" in all controllers
Now I get an error "Class '\App\User' not found (View: ...list.blade.php) which is displayed through the controller where all the models are properly defined as above.
If I run artisan dumpautoload I get "Class App\models\Article located in ./app/Models/Article.php does not comply with psr-4 autoloading standard. Skipping."
So what do I have to do to fix that issue?
namespace App\modelstonamespace App\ModelsmtoM