User.php 913 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace App;
  3. use Illuminate\Contracts\Auth\MustVerifyEmail;
  4. use Illuminate\Foundation\Auth\User as Authenticatable;
  5. use Illuminate\Notifications\Notifiable;
  6. use Laravel\Passport\HasApiTokens;
  7. class User extends Authenticatable
  8. {
  9. use HasApiTokens, Notifiable;
  10. /**
  11. * The attributes that are mass assignable.
  12. *
  13. * @var array
  14. */
  15. protected $fillable = [
  16. 'username', 'useremail', 'userpass',
  17. ];
  18. /**
  19. * The attributes that should be hidden for arrays.
  20. *
  21. * @var array
  22. */
  23. protected $hidden = [
  24. 'userpass', 'remember_token',
  25. ];
  26. /**
  27. * The attributes that should be cast to native types.
  28. *
  29. * @var array
  30. */
  31. protected $casts = [
  32. 'email_verified_at' => 'datetime',
  33. ];
  34. protected $primaryKey = 'userid';
  35. public function getAuthPassword()
  36. {
  37. return $this->userpass;
  38. }
  39. }