| Total Complexity | 1 |
| Total Lines | 69 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class Permission extends Database implements PermissionHasRelationsContract |
||
| 12 | { |
||
| 13 | use PermissionHasRelations; |
||
| 14 | use Slugable; |
||
| 15 | use SoftDeletes; |
||
| 16 | /** |
||
| 17 | * The attributes that are not mass assignable. |
||
| 18 | * |
||
| 19 | * @var array |
||
| 20 | */ |
||
| 21 | protected $guarded = [ |
||
| 22 | 'id', |
||
| 23 | ]; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * The attributes that should be mutated to dates. |
||
| 27 | * |
||
| 28 | * @var array |
||
| 29 | */ |
||
| 30 | protected $dates = [ |
||
| 31 | 'created_at', |
||
| 32 | 'updated_at', |
||
| 33 | 'deleted_at', |
||
| 34 | ]; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * The attributes that are mass assignable. |
||
| 38 | * |
||
| 39 | * @var array |
||
| 40 | */ |
||
| 41 | protected $fillable = [ |
||
| 42 | 'name', |
||
| 43 | 'slug', |
||
| 44 | 'description', |
||
| 45 | 'model', |
||
| 46 | ]; |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Typecast for protection. |
||
| 50 | * |
||
| 51 | * @var array |
||
| 52 | */ |
||
| 53 | protected $casts = [ |
||
| 54 | 'id' => 'integer', |
||
| 55 | 'name' => 'string', |
||
| 56 | 'slug' => 'string', |
||
| 57 | 'description' => 'string', |
||
| 58 | 'model' => 'string', |
||
| 59 | 'created_at' => 'datetime', |
||
| 60 | 'updated_at' => 'datetime', |
||
| 61 | 'deleted_at' => 'datetime', |
||
| 62 | ]; |
||
| 63 | |||
| 64 | /** |
||
| 65 | * Indicates if the model should be timestamped. |
||
| 66 | * |
||
| 67 | * @var bool |
||
| 68 | */ |
||
| 69 | public $timestamps = true; |
||
| 70 | |||
| 71 | /** |
||
| 72 | * Create a new model instance. |
||
| 73 | * |
||
| 74 | * @param array $attributes |
||
| 75 | */ |
||
| 76 | public function __construct(array $attributes = []) |
||
| 82 |