Admin.php 931 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace App\Models;
  3. use App\Notifications\AdminResetPassword;
  4. use Illuminate\Notifications\Notifiable;
  5. use Spatie\Permission\Traits\HasRoles;
  6. use Illuminate\Database\Eloquent\SoftDeletes;
  7. use Illuminate\Foundation\Auth\User as Authenticatable;
  8. class Admin extends Authenticatable
  9. {
  10. use Notifiable;
  11. use HasRoles;
  12. use SoftDeletes;
  13. /**
  14. * The attributes that are mass assignable.
  15. *
  16. * @var array
  17. */
  18. protected $fillable = [
  19. 'name', 'email', 'password',
  20. ];
  21. /**
  22. * The attributes that should be hidden for arrays.
  23. *
  24. * @var array
  25. */
  26. protected $hidden = [
  27. 'password', 'remember_token',
  28. ];
  29. /**
  30. * Send the password reset notification.
  31. *
  32. * @param string $token
  33. * @return void
  34. */
  35. public function sendPasswordResetNotification($token)
  36. {
  37. $this->notify(new AdminResetPassword($token));
  38. }
  39. }