Completed
Push — master ( bfbb50...8023d3 )
by Sherif
09:55
created

OauthClient::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Modules\OauthClients;
4
5
use Laravel\Passport\Client;
6
use App\Modules\Users\AclUser;
7
use App\Modules\OauthClients\ModelObservers\OauthClientObserver;
8
9
class OauthClient extends Client
10
{
11
    protected $dates    = ['created_at', 'updated_at'];
12
    protected $fillable = ['name', 'redirect', 'user_id', 'personal_access_client', 'password_client', 'revoked'];
13
    
14
    public function user()
15
    {
16
        return $this->belongsTo(AclUser::class);
17
    }
18
    
19
    public static function boot()
20
    {
21
        parent::boot();
22
        OauthClient::observe(OauthClientObserver::class);
23
    }
24
}
25