AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. namespace App\Models;
  3. use Database\Factories\UserFactory;
  4. use Illuminate\Contracts\Auth\MustVerifyEmail;
  5. use Illuminate\Database\Eloquent\Attributes\Fillable;
  6. use Illuminate\Database\Eloquent\Attributes\Hidden;
  7. use Illuminate\Database\Eloquent\Factories\HasFactory;
  8. use Illuminate\Database\Eloquent\Relations\HasMany;
  9. use Illuminate\Foundation\Auth\User as Authenticatable;
  10. use Illuminate\Notifications\Notifiable;
  11. use Illuminate\Support\Carbon;
  12. use Laravel\Fortify\TwoFactorAuthenticatable;
  13. /**
  14. * @property int $id
  15. * @property string $name
  16. * @property string $email
  17. * @property string $plan
  18. * @property Carbon|null $email_verified_at
  19. * @property string $password
  20. * @property string|null $two_factor_secret
  21. * @property string|null $two_factor_recovery_codes
  22. * @property Carbon|null $two_factor_confirmed_at
  23. * @property string|null $remember_token
  24. * @property Carbon|null $created_at
  25. * @property Carbon|null $updated_at
  26. */
  27. #[Fillable(['name', 'email', 'password'])]
  28. #[Hidden(['password', 'two_factor_secret', 'two_factor_recovery_codes', 'remember_token'])]
  29. class User extends Authenticatable implements MustVerifyEmail
  30. {
  31. /** @use HasFactory<UserFactory> */
  32. use HasFactory, Notifiable, TwoFactorAuthenticatable;
  33. /**
  34. * Get the attributes that should be cast.
  35. *
  36. * @return array<string, string>
  37. */
  38. protected function casts(): array
  39. {
  40. return [
  41. 'email_verified_at' => 'datetime',
  42. 'password' => 'hashed',
  43. 'two_factor_confirmed_at' => 'datetime',
  44. ];
  45. }
  46. /**
  47. * The stores this user owns.
  48. *
  49. * @return HasMany<Store, $this>
  50. */
  51. public function stores(): HasMany
  52. {
  53. return $this->hasMany(Store::class);
  54. }
  55. }