@@ -209,7 +209,6 @@ discard block |
||
209 | 209 | /** |
210 | 210 | * Process Restore ModelItem Request. |
211 | 211 | * |
212 | - * @param int $page_id |
|
213 | 212 | * |
214 | 213 | * @return \Illuminate\Http\RedirectResponse |
215 | 214 | */ |
@@ -225,7 +224,7 @@ discard block |
||
225 | 224 | * |
226 | 225 | * @param int $modelitem_id |
227 | 226 | * |
228 | - * @return \Illuminate\Http\Response |
|
227 | + * @return \Illuminate\Http\RedirectResponse |
|
229 | 228 | */ |
230 | 229 | public function getClone($modelitem_id) |
231 | 230 | { |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | { |
118 | 118 | $this->modelAdmin->create(); |
119 | 119 | |
120 | - return redirect($this->modelAdmin->currentUrl())->with('notifications_below_header', [['type' => 'success', 'icon' => 'check-circle', 'title' => 'Success!', 'message' => 'The '.$this->modelAdmin->title().' was successfully created.', 'dismissable' => false]]); |
|
120 | + return redirect($this->modelAdmin->currentUrl())->with('notifications_below_header', [['type' => 'success', 'icon' => 'check-circle', 'title' => 'Success!', 'message' => 'The ' . $this->modelAdmin->title() . ' was successfully created.', 'dismissable' => false]]); |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | /** |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | { |
160 | 160 | $this->modelAdmin->edit($modelitem_id); |
161 | 161 | |
162 | - return redirect($this->modelAdmin->currentUrl())->with('notifications_below_header', [['type' => 'success', 'icon' => 'check-circle', 'title' => 'Success!', 'message' => 'The '.$this->modelAdmin->title().' was successfully updated.', 'dismissable' => false]]); |
|
162 | + return redirect($this->modelAdmin->currentUrl())->with('notifications_below_header', [['type' => 'success', 'icon' => 'check-circle', 'title' => 'Success!', 'message' => 'The ' . $this->modelAdmin->title() . ' was successfully updated.', 'dismissable' => false]]); |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | /** |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | { |
192 | 192 | $this->modelAdmin->delete($modelitem_id); |
193 | 193 | |
194 | - return redirect($this->modelAdmin->currentUrl())->with('notifications_below_header', [['type' => 'success', 'icon' => 'check-circle', 'title' => 'Success!', 'message' => 'The '.$this->modelAdmin->title().' was successfully removed.', 'dismissable' => false]]); |
|
194 | + return redirect($this->modelAdmin->currentUrl())->with('notifications_below_header', [['type' => 'success', 'icon' => 'check-circle', 'title' => 'Success!', 'message' => 'The ' . $this->modelAdmin->title() . ' was successfully removed.', 'dismissable' => false]]); |
|
195 | 195 | } |
196 | 196 | |
197 | 197 | /** |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | { |
218 | 218 | $this->modelAdmin->findOnlyTrashed($modelitem_id)->restore(); |
219 | 219 | |
220 | - return redirect($this->modelAdmin->currentUrl())->with('notifications_below_header', [['type' => 'success', 'icon' => 'check-circle', 'title' => 'Success!', 'message' => 'The '.$this->modelAdmin->title().' was successfully restored.', 'dismissable' => false]]); |
|
220 | + return redirect($this->modelAdmin->currentUrl())->with('notifications_below_header', [['type' => 'success', 'icon' => 'check-circle', 'title' => 'Success!', 'message' => 'The ' . $this->modelAdmin->title() . ' was successfully restored.', 'dismissable' => false]]); |
|
221 | 221 | } |
222 | 222 | |
223 | 223 | /** |
@@ -231,6 +231,6 @@ discard block |
||
231 | 231 | { |
232 | 232 | $this->modelAdmin->find($modelitem_id)->replicate($this->modelAdmin->excludeOnClone())->save(); |
233 | 233 | |
234 | - return redirect($this->modelAdmin->currentUrl())->with('notifications_below_header', [['type' => 'success', 'icon' => 'check-circle', 'title' => 'Success!', 'message' => 'The '.$this->modelAdmin->title().' was successfully cloned.', 'dismissable' => false]]); |
|
234 | + return redirect($this->modelAdmin->currentUrl())->with('notifications_below_header', [['type' => 'success', 'icon' => 'check-circle', 'title' => 'Success!', 'message' => 'The ' . $this->modelAdmin->title() . ' was successfully cloned.', 'dismissable' => false]]); |
|
235 | 235 | } |
236 | 236 | } |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | return static::$view; |
202 | 202 | } |
203 | 203 | |
204 | - return 'flare::'.static::$view; |
|
204 | + return 'flare::' . static::$view; |
|
205 | 205 | } |
206 | 206 | |
207 | 207 | /** |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | */ |
308 | 308 | public static function relativeUrl($path = '') |
309 | 309 | { |
310 | - return \Flare::relativeAdminUrl(static::urlPrefix().($path ? '/'.$path : '')); |
|
310 | + return \Flare::relativeAdminUrl(static::urlPrefix() . ($path ? '/' . $path : '')); |
|
311 | 311 | } |
312 | 312 | |
313 | 313 | /** |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | */ |
332 | 332 | public static function relativeCurrentUrl($path) |
333 | 333 | { |
334 | - return \Route::current() ? \Route::current()->getPrefix().'/'.$path : null; |
|
334 | + return \Route::current() ? \Route::current()->getPrefix() . '/' . $path : null; |
|
335 | 335 | } |
336 | 336 | |
337 | 337 | /** |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | public function renderAdd() |
74 | 74 | { |
75 | - return view($this->viewpath.'.add', []); |
|
75 | + return view($this->viewpath . '.add', []); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | */ |
83 | 83 | public function renderEdit() |
84 | 84 | { |
85 | - return view($this->viewpath.'.edit', []); |
|
85 | + return view($this->viewpath . '.edit', []); |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | /** |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | public function renderView() |
94 | 94 | { |
95 | - return view($this->viewpath.'.view', []); |
|
95 | + return view($this->viewpath . '.view', []); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
@@ -122,10 +122,10 @@ discard block |
||
122 | 122 | */ |
123 | 123 | public function getFieldOptions() |
124 | 124 | { |
125 | - if (method_exists($this->getModelManager(), $method = camel_case('get_'.$this->getAttribute().'_options'))) { |
|
125 | + if (method_exists($this->getModelManager(), $method = camel_case('get_' . $this->getAttribute() . '_options'))) { |
|
126 | 126 | // First check for a method of options based on getAttributeNameOptions() |
127 | 127 | $this->field['options'] = $this->getModelManager()->$method(); |
128 | - } elseif (isset($this->field['options']) && is_string($this->field['options']) && method_exists($this->getModelManager(), $method = camel_case('get_'.$this->field['options'].'_options'))) { |
|
128 | + } elseif (isset($this->field['options']) && is_string($this->field['options']) && method_exists($this->getModelManager(), $method = camel_case('get_' . $this->field['options'] . '_options'))) { |
|
129 | 129 | // Check if Options is a string and if so, check for a method |
130 | 130 | // of options based on getDefinedOptions() |
131 | 131 | $this->field['options'] = $this->getModelManager()->$method(); |
@@ -31,16 +31,16 @@ |
||
31 | 31 | return static::$view; |
32 | 32 | } |
33 | 33 | |
34 | - if (view()->exists('admin.menus.'.static::location().'.widget')) { |
|
35 | - return 'admin.'.static::safeTitle().'.widget'; |
|
34 | + if (view()->exists('admin.menus.' . static::location() . '.widget')) { |
|
35 | + return 'admin.' . static::safeTitle() . '.widget'; |
|
36 | 36 | } |
37 | 37 | |
38 | - if (view()->exists('admin.menus.'.static::safeTitle())) { |
|
39 | - return 'admin.menus.'.static::safeTitle(); |
|
38 | + if (view()->exists('admin.menus.' . static::safeTitle())) { |
|
39 | + return 'admin.menus.' . static::safeTitle(); |
|
40 | 40 | } |
41 | 41 | |
42 | - if (view()->exists('flare::'.self::$view)) { |
|
43 | - return 'flare::'.self::$view; |
|
42 | + if (view()->exists('flare::' . self::$view)) { |
|
43 | + return 'flare::' . self::$view; |
|
44 | 44 | } |
45 | 45 | } |
46 | 46 |
@@ -40,16 +40,16 @@ |
||
40 | 40 | return static::$view; |
41 | 41 | } |
42 | 42 | |
43 | - if (view()->exists('admin.'.static::urlPrefix().'.index')) { |
|
44 | - return 'admin.'.static::urlPrefix().'.index'; |
|
43 | + if (view()->exists('admin.' . static::urlPrefix() . '.index')) { |
|
44 | + return 'admin.' . static::urlPrefix() . '.index'; |
|
45 | 45 | } |
46 | 46 | |
47 | - if (view()->exists('admin.'.static::urlPrefix())) { |
|
48 | - return 'admin.'.static::urlPrefix(); |
|
47 | + if (view()->exists('admin.' . static::urlPrefix())) { |
|
48 | + return 'admin.' . static::urlPrefix(); |
|
49 | 49 | } |
50 | 50 | |
51 | - if (view()->exists('flare::'.self::$view)) { |
|
52 | - return 'flare::'.self::$view; |
|
51 | + if (view()->exists('flare::' . self::$view)) { |
|
52 | + return 'flare::' . self::$view; |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | return parent::getView(); |
@@ -49,20 +49,20 @@ |
||
49 | 49 | return static::$view; |
50 | 50 | } |
51 | 51 | |
52 | - if (view()->exists('admin.widgets.'.static::safeTitle().'.widget')) { |
|
53 | - return 'admin.widgets.'.static::safeTitle().'.widget'; |
|
52 | + if (view()->exists('admin.widgets.' . static::safeTitle() . '.widget')) { |
|
53 | + return 'admin.widgets.' . static::safeTitle() . '.widget'; |
|
54 | 54 | } |
55 | 55 | |
56 | - if (view()->exists('admin.widgets.'.static::safeTitle())) { |
|
57 | - return 'admin.widgets.'.static::safeTitle(); |
|
56 | + if (view()->exists('admin.widgets.' . static::safeTitle())) { |
|
57 | + return 'admin.widgets.' . static::safeTitle(); |
|
58 | 58 | } |
59 | 59 | |
60 | - if (view()->exists('admin.'.static::safeTitle())) { |
|
61 | - return 'admin.'.static::safeTitle(); |
|
60 | + if (view()->exists('admin.' . static::safeTitle())) { |
|
61 | + return 'admin.' . static::safeTitle(); |
|
62 | 62 | } |
63 | 63 | |
64 | - if (view()->exists('flare::'.self::$view)) { |
|
65 | - return 'flare::'.self::$view; |
|
64 | + if (view()->exists('flare::' . self::$view)) { |
|
65 | + return 'flare::' . self::$view; |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 |
@@ -102,7 +102,7 @@ |
||
102 | 102 | $view = 'admin.dashboard'; |
103 | 103 | |
104 | 104 | if (!view()->exists($view)) { |
105 | - $view = 'flare::'.$view; |
|
105 | + $view = 'flare::' . $view; |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | return view($view, ['widgetAdminManager' => (new WidgetAdminManager())]); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | /** |
75 | 75 | * Log the user. |
76 | 76 | * |
77 | - * @return \Illuminate\Http\RedirectReponse |
|
77 | + * @return \Illuminate\Http\RedirectResponse |
|
78 | 78 | */ |
79 | 79 | public function getLogout() |
80 | 80 | { |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * panel.If they do no, they will be sent |
118 | 118 | * to the homepage of the website. |
119 | 119 | * |
120 | - * @return \Illuminate\Http\RedirectReponse |
|
120 | + * @return \Illuminate\Http\RedirectResponse |
|
121 | 121 | */ |
122 | 122 | protected function loginRedirect() |
123 | 123 | { |
@@ -170,8 +170,8 @@ |
||
170 | 170 | { |
171 | 171 | // Could swap this out for model -> getAttribute, then check if we have an attribute or a relation... getRelationValue() is helpful |
172 | 172 | if (method_exists($this->model, $key) && is_a(call_user_func_array([$this->model, $key], []), 'Illuminate\Database\Eloquent\Relations\Relation')) { |
173 | - foreach ($this->{$action.'Relations'} as $relationship => $method) { |
|
174 | - if (is_a(call_user_func_array([$this->model, $key], []), 'Illuminate\Database\Eloquent\Relations\\'.$relationship)) { |
|
173 | + foreach ($this->{$action . 'Relations'} as $relationship => $method) { |
|
174 | + if (is_a(call_user_func_array([$this->model, $key], []), 'Illuminate\Database\Eloquent\Relations\\' . $relationship)) { |
|
175 | 175 | $this->model->$key()->$method($value); |
176 | 176 | |
177 | 177 | return; |
@@ -29,19 +29,19 @@ discard block |
||
29 | 29 | // parameter represents the DataTables column identifier. In this case simple |
30 | 30 | // indexes |
31 | 31 | $columns = array( |
32 | - array( 'db' => 'id', 'dt' => 0 ), |
|
33 | - array( 'db' => 'firstname', 'dt' => 1 ), |
|
34 | - array( 'db' => 'surname', 'dt' => 2 ), |
|
35 | - array( 'db' => 'zip', 'dt' => 3 ), |
|
36 | - array( 'db' => 'country', 'dt' => 4 ) |
|
32 | + array( 'db' => 'id', 'dt' => 0 ), |
|
33 | + array( 'db' => 'firstname', 'dt' => 1 ), |
|
34 | + array( 'db' => 'surname', 'dt' => 2 ), |
|
35 | + array( 'db' => 'zip', 'dt' => 3 ), |
|
36 | + array( 'db' => 'country', 'dt' => 4 ) |
|
37 | 37 | ); |
38 | 38 | |
39 | 39 | // SQL server connection information |
40 | 40 | $sql_details = array( |
41 | - 'user' => '', |
|
42 | - 'pass' => '', |
|
43 | - 'db' => '', |
|
44 | - 'host' => '' |
|
41 | + 'user' => '', |
|
42 | + 'pass' => '', |
|
43 | + 'db' => '', |
|
44 | + 'host' => '' |
|
45 | 45 | ); |
46 | 46 | |
47 | 47 | |
@@ -53,6 +53,6 @@ discard block |
||
53 | 53 | require( '../../../../examples/server_side/scripts/ssp.class.php' ); |
54 | 54 | |
55 | 55 | echo json_encode( |
56 | - SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns ) |
|
56 | + SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns ) |
|
57 | 57 | ); |
58 | 58 |
@@ -29,11 +29,11 @@ discard block |
||
29 | 29 | // parameter represents the DataTables column identifier. In this case simple |
30 | 30 | // indexes |
31 | 31 | $columns = array( |
32 | - array( 'db' => 'id', 'dt' => 0 ), |
|
33 | - array( 'db' => 'firstname', 'dt' => 1 ), |
|
34 | - array( 'db' => 'surname', 'dt' => 2 ), |
|
35 | - array( 'db' => 'zip', 'dt' => 3 ), |
|
36 | - array( 'db' => 'country', 'dt' => 4 ) |
|
32 | + array('db' => 'id', 'dt' => 0), |
|
33 | + array('db' => 'firstname', 'dt' => 1), |
|
34 | + array('db' => 'surname', 'dt' => 2), |
|
35 | + array('db' => 'zip', 'dt' => 3), |
|
36 | + array('db' => 'country', 'dt' => 4) |
|
37 | 37 | ); |
38 | 38 | |
39 | 39 | // SQL server connection information |
@@ -50,9 +50,9 @@ discard block |
||
50 | 50 | * server-side, there is no need to edit below this line. |
51 | 51 | */ |
52 | 52 | |
53 | -require( '../../../../examples/server_side/scripts/ssp.class.php' ); |
|
53 | +require('../../../../examples/server_side/scripts/ssp.class.php'); |
|
54 | 54 | |
55 | 55 | echo json_encode( |
56 | - SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns ) |
|
56 | + SSP::simple($_GET, $sql_details, $table, $primaryKey, $columns) |
|
57 | 57 | ); |
58 | 58 |