Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | public function makeModuleACL() |
||
31 | { |
||
32 | $this->validate([ |
||
33 | 'model_name' => 'required|max:30' |
||
34 | ]); |
||
35 | |||
36 | Permission::create([ |
||
37 | 'browse' => 1, |
||
38 | 'read' => 1, |
||
39 | 'edit' => 1, |
||
40 | 'add' => 1, |
||
41 | 'delete' => 1, |
||
42 | 'role_id' => $this->role->id, |
||
43 | 'model' => $this->model_name, |
||
44 | ]); |
||
45 | $this->permissions = Permission::where('role_id', $this->role->id)->get(); |
||
46 | |||
47 | $this->emit('make_module_acl_success'); |
||
48 | } |
||
64 |