Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
User
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 casts
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace App\Models;
4
5// use Illuminate\Contracts\Auth\MustVerifyEmail;
6use Illuminate\Database\Eloquent\Factories\HasFactory;
7use Illuminate\Foundation\Auth\User as Authenticatable;
8use Illuminate\Notifications\Notifiable;
9use Laravel\Sanctum\HasApiTokens;
10
11class User extends Authenticatable
12{
13    /** @use HasFactory<\Database\Factories\UserFactory> */
14    use HasFactory, Notifiable, HasApiTokens;
15
16    /**
17     * The attributes that are mass assignable.
18     *
19     * @var list<string>
20     */
21    protected $fillable = [
22        'name',
23        'email',
24        'password',
25    ];
26
27    /**
28     * The attributes that should be hidden for serialization.
29     *
30     * @var list<string>
31     */
32    protected $hidden = [
33        'password',
34        'remember_token',
35    ];
36
37    /**
38     * Get the attributes that should be cast.
39     *
40     * @return array<string, string>
41     */
42    protected function casts(): array
43    {
44        return [
45            'email_verified_at' => 'datetime',
46            'password' => 'hashed',
47        ];
48    }
49}