Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
Role | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
Activity_logs | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getCreatedAtAttribute | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace App\Models; |
4 | |
5 | use App\Traits\helper; |
6 | use Illuminate\Database\Eloquent\SoftDeletes; |
7 | use Laratrust\Models\LaratrustRole; |
8 | |
9 | class Role extends LaratrustRole |
10 | { |
11 | use SoftDeletes; |
12 | use helper; |
13 | |
14 | |
15 | protected $table = 'roles'; |
16 | |
17 | public $guarded = []; |
18 | |
19 | //relations |
20 | public function Activity_logs() |
21 | { |
22 | return $this->morphMany(Activity_log::class, 'causer'); |
23 | } |
24 | |
25 | public function getCreatedAtAttribute(){ |
26 | return $this->date_format($this->attributes['created_at']); |
27 | } |
28 | } |