Support the ongoing development of Laravel.io →
Installation Configuration Eloquent

Hi ,

I code works fine when i run it in homestead box , where as it shows following error when i ran it into my ubuntu server

exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Class 'Illuminate\Foundation\Auth\User' not found' in /home/laravel/app/User.php:8

This is my User.php <?php

 namespace App;

   use Illuminate\Foundation\Auth\User as Authenticatable;

 class User extends Authenticatable
       {
           /**
           * The attributes that are mass assignable.
            *
           * @var array
            */
          protected $fillable = [
               'name', 'email', 'password',
              ];

.......

Any idea how to resolve?

Last updated 3 years ago.
0

composer dump artisan optimize

Why it can't find that class is odd, but it could be a composer issue, so have it dump the autoload out again.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.