Laravel Jenssegers/MongoDB Authenticatable

Image for post
Image for post

Are you facing this error? Don’t worry! All you need to do is go to App\User.php model, then replacing the default Authenticable below:

namespace App;use Illuminate\Notifications\Notifiable;
use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{

with this one:

namespace App;use Illuminate\Notifications\Notifiable;
use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
use Jenssegers\Mongodb\Auth\User as Authenticatable;
class User extends Authenticatable
{

Then try to refresh your page! I’m using Laravel 5.6.* by the way.

I wrote these tutorials for myself in future when I forget for the next steps.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store