Changing Path for User Class in Laravel
I moved the User.php in my laravel installation to a different folder and adjusted the namespace accordingly. Still, when I login into the page, laravel is not able to find the class and throws an error.
I ran composer clear-cash
and composer dump-autoload
but still it is not working as Laravel still searches for App/User.php
instead of App/Classes/User/User.php
The User.php looks like this:
namespace AppClassesUser;
use AppEventsEventGenerator;
use AppEventsUserUserRegistered;
use AppPermission;
use AppRole;
use LaratrustTraitsLaratrustUserTrait;
use IlluminateContractsAuthAuthenticatable as Authenticatable;
use IlluminateNotificationsNotifiable;
use IlluminateDatabaseEloquentModel;
use IlluminateConsoleCommand;
class User extends Model implements Authenticatable {
use EventGenerator;
(...)
from Laravel Questions and Answers https://laravelquestions.com/php/changing-path-for-user-class-in-laravel/
via Lzo Media
No comments:
Post a Comment