My SMM panel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

60 lines
1.1 KiB

  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Contracts\Auth\MustVerifyEmail;
  4. use Illuminate\Database\Eloquent\Factories\HasFactory;
  5. use Illuminate\Foundation\Auth\User as Authenticatable;
  6. use Illuminate\Notifications\Notifiable;
  7. use App\Models\Order;
  8. use App\Models\Transaction;
  9. use App\Models\Ticket;
  10. class User extends Authenticatable implements MustVerifyEmail
  11. {
  12. use HasFactory, Notifiable;
  13. /**
  14. * The attributes that are mass assignable.
  15. *
  16. * @var array
  17. */
  18. protected $fillable = [
  19. 'name',
  20. 'email',
  21. 'password',
  22. ];
  23. /**
  24. * The attributes that should be hidden for arrays.
  25. *
  26. * @var array
  27. */
  28. protected $hidden = [
  29. 'password',
  30. 'remember_token',
  31. ];
  32. /**
  33. * The attributes that should be cast to native types.
  34. *
  35. * @var array
  36. */
  37. protected $casts = [
  38. 'email_verified_at' => 'datetime',
  39. ];
  40. public function orders() {
  41. return $this->hasMany(Order::class);
  42. }
  43. public function transactions() {
  44. return $this->hasMany(Transaction::class);
  45. }
  46. public function tickets() {
  47. return $this->hasMany(Ticket::class);
  48. }
  49. }