Second Commit
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

85 行
1.3 KiB

  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\Model;
  5. use Illuminate\Foundation\Auth\UserAccount as Authenticatable;
  6. use Illuminate\Notifications\Notifiable;
  7. class UserAccount extends Authenticatable{
  8. use HasFactory, Notifiable;
  9. /**
  10. * The attributes that are mass assignable.
  11. *
  12. * @var array
  13. */
  14. protected $primaryKey = 'user_id';
  15. protected $fillable = [
  16. 'name',
  17. 'tanggal_lahir',
  18. 'tempat_lahir',
  19. 'email',
  20. 'provider_id',
  21. 'photo_account',
  22. 'handphone',
  23. 'jenis_kelamin',
  24. 'agama',
  25. 'password',
  26. 'user_role',
  27. ];
  28. /**
  29. * The attributes that should be hidden for arrays.
  30. *
  31. * @var array
  32. */
  33. protected $hidden = [
  34. 'password',
  35. 'remember_token',
  36. ];
  37. /**
  38. * The attributes that should be cast to native types.
  39. *
  40. * @var array
  41. */
  42. protected $casts = [
  43. 'email_verified_at' => 'datetime',
  44. ];
  45. public function Authenticationotp()
  46. {
  47. return $this->hasMany(AuthenticationOtp::class, 'user_id');
  48. }
  49. /**
  50. * customer
  51. *
  52. * @return void
  53. */
  54. public function MacAddress()
  55. {
  56. return $this->belongsTo(accessLogs::class);
  57. }
  58. }