0

I have this error when a user tries to login in using their Facebook account:

(1/1) FatalErrorException Class 'Illuminate\Foundation\Auth\Fbuser' not found

Here is my code:

namespace App;

use App\Fbuser;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Foundation\Auth\Fbuser as Authenticatable;

class Fbuser extends Authenticatable
{
    protected $fillable = [
        'first_name','last_name', 'email', 'work',
    ];

    protected $hidden = [
        'remember_token',
    ];
}
danday74
  • 52,471
  • 49
  • 232
  • 283
user23
  • 3
  • 6

3 Answers3

0

You should try this:

Just remove use App\Fbuser; from your model and try it

AND update your model like:

    namespace App;

    use Illuminate\Database\Eloquent\Model;


    class Fbuser extends Model
    {
         /**
   * The database table used by the model.
   *
   * @var string
   */
  protected $table = 'your_table_name';

  /**
   * The database primary key value.
   *
   * @var string
   */
  protected $guarded = ['id'];        


         protected $fillable = [
            'first_name','last_name', 'email', 'work',
        ];


    }

Hope this work for you !!!!

AddWeb Solution Pvt Ltd
  • 21,025
  • 5
  • 26
  • 57
0

This can be due to a couple of reasons.

  1. You pulled a package but didn't update the laravel service provider's list in the config/app.php file.
  2. Try running composer dump-autoload after the new package installed.
  3. Try clearing the files cache by running php artisan cache:clear
Arun Code
  • 1,548
  • 1
  • 13
  • 18
0

run this code and check

composer update --no-scripts