Admin   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 0
Metric Value
dl 0
loc 42
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 5

1 Method

Rating   Name   Duplication   Size   Complexity  
A newFactory() 0 4 1
1
<?php
2
3
namespace Devfaysal\LaravelAdmin\Models;
4
5
use Illuminate\Contracts\Auth\MustVerifyEmail;
6
use Illuminate\Database\Eloquent\Factories\HasFactory;
7
use Illuminate\Database\Eloquent\SoftDeletes;
8
use Illuminate\Foundation\Auth\User as Authenticatable;
9
use Illuminate\Notifications\Notifiable;
10
use Spatie\Permission\Traits\HasRoles;
11
12
class Admin extends Authenticatable
13
{
14
    use HasFactory, HasRoles, SoftDeletes, Notifiable;
15
16
    /**
17
     * The attributes that are mass assignable.
18
     *
19
     * @var array
20
     */
21
    protected $fillable = [
22
        'name', 'email', 'phone', 'password',
23
    ];
24
25
    /**
26
     * The attributes that should be hidden for arrays.
27
     *
28
     * @var array
29
     */
30
    protected $hidden = [
31
        'password', 'remember_token',
32
    ];
33
34
    /**
35
     * The attributes that should be cast to native types.
36
     *
37
     * @var array
38
     */
39
    protected $casts = [
40
        'email_verified_at' => 'datetime',
41
        'last_login_at' => 'datetime'
42
    ];
43
44
    /**
45
     * Create a new factory instance for the model.
46
     *
47
     * @return \Illuminate\Database\Eloquent\Factories\Factory
48
     */
49
    protected static function newFactory()
50
    {
51
        return config('laravel-admin.factory')::new();
52
    }
53
}
54