Advertisement
Guest User

Untitled

a guest
Oct 26th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App;
  4.  
  5. use App\Role;
  6. use App\RoleUser;
  7. use Illuminate\Database\Eloquent\Model;
  8. use Illuminate\Auth\Authenticatable;
  9. use Illuminate\Auth\Passwords\CanResetPassword;
  10. use Bican\Roles\Traits\HasRoleAndPermission;
  11. use Bican\Roles\Contracts\HasRoleAndPermission as HasRoleAndPermissionContract;
  12. use Illuminate\Notifications\Notifiable as Notifiable;
  13. use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
  14. use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
  15.  
  16. class User extends Model implements AuthenticatableContract, CanResetPasswordContract, HasRoleAndPermissionContract
  17. {
  18. use Authenticatable, CanResetPassword, HasRoleAndPermission, Notifiable;
  19.  
  20. /**
  21. * The attributes that are mass assignable.
  22. *
  23. * @var array
  24. */
  25. protected $fillable = [
  26. 'name', 'email', 'password',
  27. ];
  28.  
  29. /**
  30. * The attributes that should be hidden for arrays.
  31. *
  32. * @var array
  33. */
  34. protected $hidden = [
  35. 'password', 'remember_token',
  36. ];
  37.  
  38. public function area()
  39. {
  40. return $this->belongsTo('App\Area','area_id');
  41. }
  42.  
  43. public function reservations()
  44. {
  45. return $this->hasMany('App\Reservation','customer_id');
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement