Issues (71)

src/Models/User.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Mongi\Mongicommerce\Models;
4
5
6
use Mongi\Mongicommerce\Models\Order;
7
use Illuminate\Notifications\Notifiable;
8
use Illuminate\Database\Eloquent\Factories\HasFactory;
9
use Illuminate\Foundation\Auth\User as Authenticatable;
10
11
class User extends Authenticatable
12
{
13
    use HasFactory, Notifiable;
0 ignored issues
show
The trait Illuminate\Notifications\Notifiable requires the property $email which is not provided by Mongi\Mongicommerce\Models\User.
Loading history...
14
15
    /**
16
     * The attributes that are mass assignable.
17
     *
18
     * @var array
19
     */
20
    protected $fillable = [
21
        'name',
22
        'first_name',
23
        'last_name',
24
        'email',
25
        'password',
26
    ];
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
    /**
39
     * The attributes that should be cast to native types.
40
     *
41
     * @var array
42
     */
43
    protected $casts = [
44
        'email_verified_at' => 'datetime',
45
    ];
46
47
    public function orders()
48
    {
49
        return $this->hasMany(Order::class, 'user_id');
50
    }
51
}
52