Class '\App\User' not found in Laravel when changing the namespace

前端 未结 15 2733
面向向阳花
面向向阳花 2020-12-13 13:23

I am having this error when moving User.php to Models/User.php

local.ERROR: Symfony\\Component\\Debug\\Exception\\FatalThrow

15条回答
  •  無奈伤痛
    2020-12-13 13:54

    I have got the same kind of issue a few days back. So I did this: Run this command

    php artisan config:cache 
    php artisan config:clear
    

    And it solved my issue.Most of the issues are solved by this. I recommend to try this first and if this doesn't solve your issue then go for other hacks.

提交回复
热议问题