laravel-shop/workbench/app/Models/User.php

58 lines
1.3 KiB
PHP
Raw Permalink Normal View History

2025-12-03 13:18:38 +00:00
<?php
namespace Workbench\App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Blax\Shop\Traits\HasShoppingCapabilities;
use Blax\Shop\Traits\HasStripeAccount;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
use HasFactory, Notifiable, HasShoppingCapabilities, HasUuids, HasStripeAccount;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'name',
'email',
'password',
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'email_verified_at' => 'datetime',
];
2025-12-03 13:49:44 +00:00
/**
* Set the user's password.
*
* @param string $value
* @return void
*/
public function setPasswordAttribute($value)
{
$this->attributes['password'] = bcrypt($value);
}
2025-12-03 13:18:38 +00:00
}