@@ -37,12 +37,12 @@ |
||
| 37 | 37 | |
| 38 | 38 | public function create(Permissions $permissions) |
| 39 | 39 | { |
| 40 | - return view('back-project::roles.create')->with('permissions', $permissions->all()); |
|
| 40 | + return view('back-project::roles.create')->with('permissions', $permissions->all()); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | public function store(RoleAdd $request, Roles $roles) |
| 44 | 44 | { |
| 45 | - $role= $roles->create($request->all()); |
|
| 45 | + $role = $roles->create($request->all()); |
|
| 46 | 46 | |
| 47 | 47 | Alert::add('success', trans('back-project::crud.model_created', ['model' => trans('back-project::roles.role')]))->flash(); |
| 48 | 48 | |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | |
| 43 | 43 | public function store(PermissionAdd $request, Permissions $permissions) |
| 44 | 44 | { |
| 45 | - $permission= $permissions->create($request->all()); |
|
| 45 | + $permission = $permissions->create($request->all()); |
|
| 46 | 46 | |
| 47 | 47 | Alert::add('success', trans('back-project::crud.model_created', ['model' => trans('back-project::permissions.permission')]))->flash(); |
| 48 | 48 | |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public function attachments() |
| 22 | 22 | { |
| 23 | - return $this->morphToMany( Attachment::class, 'attachable' )->orderBy('is_main', 'desc'); |
|
| 23 | + return $this->morphToMany(Attachment::class, 'attachable')->orderBy('is_main', 'desc'); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | public function getAttachment() { |
@@ -19,6 +19,6 @@ |
||
| 19 | 19 | |
| 20 | 20 | public function attachments() |
| 21 | 21 | { |
| 22 | - return $this->morphToMany( Attachment::class, 'attachable' )->orderBy('is_main', 'desc'); |
|
| 22 | + return $this->morphToMany(Attachment::class, 'attachable')->orderBy('is_main', 'desc'); |
|
| 23 | 23 | } |
| 24 | 24 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | return $this->model->create($data); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - public function update(array $data, $id, $attribute="id") |
|
| 51 | + public function update(array $data, $id, $attribute = "id") |
|
| 52 | 52 | { |
| 53 | 53 | $model_data = $this->model->where($attribute, '=', $id)->first(); |
| 54 | 54 | |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | return $this; |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | - public function skipCriteria($status = true){ |
|
| 126 | + public function skipCriteria($status = true) { |
|
| 127 | 127 | $this->skipCriteria = $status; |
| 128 | 128 | return $this; |
| 129 | 129 | } |
@@ -143,11 +143,11 @@ discard block |
||
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | public function applyCriteria() { |
| 146 | - if($this->skipCriteria === true) |
|
| 146 | + if ($this->skipCriteria === true) |
|
| 147 | 147 | return $this; |
| 148 | 148 | |
| 149 | - foreach($this->getCriteria() as $criteria) { |
|
| 150 | - if($criteria instanceof Criteria) |
|
| 149 | + foreach ($this->getCriteria() as $criteria) { |
|
| 150 | + if ($criteria instanceof Criteria) |
|
| 151 | 151 | $this->model = $criteria->apply($this->model, $this); |
| 152 | 152 | } |
| 153 | 153 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | public function getUniqueUsername($name) |
| 101 | 101 | { |
| 102 | - $nrRand = rand(0,100); |
|
| 102 | + $nrRand = rand(0, 100); |
|
| 103 | 103 | |
| 104 | 104 | return $name.$nrRand; |
| 105 | 105 | } |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | foreach ($data as $row): |
| 134 | 134 | $body[] = [ |
| 135 | 135 | 'columns' => [ |
| 136 | - ['content' => '<img src="' . \Avatar::create(strtoupper($row->username))->toBase64() . '" alt="' . $row->username . ' width="40px" height="40px"> '], |
|
| 136 | + ['content' => '<img src="'.\Avatar::create(strtoupper($row->username))->toBase64().'" alt="'.$row->username.' width="40px" height="40px"> '], |
|
| 137 | 137 | //['content' => false, 'action' => false, 'icon' => ($row->isConfirmed() ? "check" : 'times')], |
| 138 | 138 | ['content' => $row->username], |
| 139 | 139 | ['content' => $row->email], |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | $body = []; |
| 55 | 55 | |
| 56 | 56 | foreach ($data as $row): |
| 57 | - $actions =[]; |
|
| 57 | + $actions = []; |
|
| 58 | 58 | |
| 59 | 59 | if ($row->name !== 'administrator' and $row->name !== 'user') { |
| 60 | 60 | $actions = [ |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | $body = []; |
| 71 | 71 | |
| 72 | 72 | foreach ($data as $row): |
| 73 | - $actions =[]; |
|
| 73 | + $actions = []; |
|
| 74 | 74 | |
| 75 | 75 | if ($row->name !== 'administration' and $row->name !== 'backend') { |
| 76 | 76 | $actions = [ |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | { |
| 52 | 52 | $format = $this->chooseFormat($format); |
| 53 | 53 | |
| 54 | - return '<img src="'.$this->getCachedImageUrl($format, $image->name).'" alt="'.$image->description.'" '.$attributes. '>'; |
|
| 54 | + return '<img src="'.$this->getCachedImageUrl($format, $image->name).'" alt="'.$image->description.'" '.$attributes.'>'; |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | protected function chooseFormat($format) |