Skip to content

Instantly share code, notes, and snippets.

@tuckbloor
Last active April 19, 2016 08:11
Show Gist options
  • Save tuckbloor/5b33c2df6bce5929cfba3e682faa2a39 to your computer and use it in GitHub Desktop.
Save tuckbloor/5b33c2df6bce5929cfba3e682faa2a39 to your computer and use it in GitHub Desktop.
laravel 5.2 user model with jenssegers monngo
<?php
namespace App;
use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
//use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Auth\Authenticatable as AuthenticableTrait;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
class User extends Eloquent implements AuthenticatableContract,CanResetPasswordContract
{
use AuthenticableTrait, CanResetPassword;
//Authenticatable was removed from use
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email', 'password',
];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment