Skip to content

Instantly share code, notes, and snippets.

@azhar25git
Forked from bramnauta/User.php
Created February 28, 2018 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save azhar25git/ba4c8311fd2c3a6de483423a6682ea00 to your computer and use it in GitHub Desktop.
Save azhar25git/ba4c8311fd2c3a6de483423a6682ea00 to your computer and use it in GitHub Desktop.
app/User.php
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Auth\Authenticatable;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Foundation\Auth\Access\Authorizable;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
class User extends \Jenssegers\Mongodb\Eloquent\Model implements
AuthenticatableContract,
AuthorizableContract,
CanResetPasswordContract
{
use Authenticatable, Authorizable, CanResetPassword, Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email', 'password',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
}
@azhar25git
Copy link
Author

Laravel MongoDB User Model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment