Created
March 4, 2015 13:16
-
-
Save ziyahan/ad3425172269013b6d0c to your computer and use it in GitHub Desktop.
User
This file contains hidden or 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\DBModel; | |
use Illuminate\Auth\Authenticatable; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Auth\Passwords\CanResetPassword; | |
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; | |
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract; | |
class User extends Model implements AuthenticatableContract, CanResetPasswordContract { | |
use Authenticatable, CanResetPassword; | |
/** | |
* 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']; | |
public function role() | |
{ | |
return $this->belongsTo('App\DBModel\Role'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment