Esempio n. 1
0
 public function setPermissionsAttribute($permissions)
 {
     if (!$this->id) {
         $this->save();
     }
     foreach ($permissions as $resource => $actions) {
         Permission::updatePermissionStatus($this->id, $resource, $actions);
     }
 }