Created
August 19, 2017 10:55
-
-
Save mohsenuss91/8e3e68d43490795ac9c6f97a2bd30263 to your computer and use it in GitHub Desktop.
User Model to login
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use Illuminate\Auth\Authenticatable; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; | |
class User extends Model implements AuthenticatableContract | |
{ | |
use Authenticatable; | |
/** | |
* The database table used by the model. | |
* | |
* @var string | |
*/ | |
protected $table = 'users'; | |
/** | |
* 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