Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App;
- use App\Role;
- use App\RoleUser;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Auth\Authenticatable;
- use Illuminate\Auth\Passwords\CanResetPassword;
- use Bican\Roles\Traits\HasRoleAndPermission;
- use Bican\Roles\Contracts\HasRoleAndPermission as HasRoleAndPermissionContract;
- use Illuminate\Notifications\Notifiable as Notifiable;
- use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
- use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
- class User extends Model implements AuthenticatableContract, CanResetPasswordContract, HasRoleAndPermissionContract
- {
- use Authenticatable, CanResetPassword, HasRoleAndPermission, 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',
- ];
- public function area()
- {
- return $this->belongsTo('App\Area','area_id');
- }
- public function reservations()
- {
- return $this->hasMany('App\Reservation','customer_id');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement