| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php namespace Modules\User\Repositories\Usher; |
||
| 34 | public function create($data) |
||
| 35 | { |
||
| 36 | $entity = $this->role->getClassName(); |
||
| 37 | $role = new $entity; |
||
| 38 | |||
| 39 | $role->create( |
||
| 40 | $data['name'], |
||
| 41 | $data['permissions'] |
||
| 42 | ); |
||
| 43 | |||
| 44 | $this->role->persist($role); |
||
| 45 | $this->role->flush(); |
||
| 46 | |||
| 47 | return $role; |
||
| 48 | } |
||
| 49 | |||
| 103 |