Esempio n. 1
0
 public static function create(array $attributes = [])
 {
     $param = $attributes;
     $create = new Permission();
     $create->group = $param['group'];
     $create->name = $param['name'];
     $create->slug = isset($param['slug']) ? $param['slug'] : str_slug($param['name'], '.');
     $create->description = isset($param['description']) ? $param['description'] : null;
     $create->save();
     return $create;
 }