File manager - Edit - /var/www/payraty/helpdesk/app/Models/ArticleRole.php
Back
<?php namespace App\Models; use Common\Auth\Roles\Role; use Illuminate\Database\Eloquent\Casts\Attribute; class ArticleRole extends Role { protected $table = 'roles'; protected $appends = ['manage', 'view']; protected function manage(): Attribute { return Attribute::make(get: fn() => (bool) $this->pivot->manage); } protected function view(): Attribute { return Attribute::make( get: fn() => (bool) ($this->pivot->manage ?: $this->pivot->view), ); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.30 | Generation time: 0.29 |
proxy
|
phpinfo
|
Settings