@@ -27,7 +27,7 @@ |
||
| 27 | 27 | public function detailRender($row, $column) |
| 28 | 28 | { |
| 29 | 29 | $column->setValue($row->{ $column->getField() }); |
| 30 | - return view("types::file.detail",[ |
|
| 30 | + return view("types::file.detail", [ |
|
| 31 | 31 | 'row'=>$row, |
| 32 | 32 | 'column'=>$column |
| 33 | 33 | ]); |
@@ -18,8 +18,8 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | public function handle($request, Closure $next) |
| 20 | 20 | { |
| 21 | - if(auth()->guest()) { |
|
| 22 | - return cb()->redirect(cb()->getLoginUrl("login"),trans('crudbooster.not_logged_in'),'warning'); |
|
| 21 | + if (auth()->guest()) { |
|
| 22 | + return cb()->redirect(cb()->getLoginUrl("login"), trans('crudbooster.not_logged_in'), 'warning'); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | (new CBHook())->beforeBackendMiddleware($request); |
@@ -40,12 +40,12 @@ discard block |
||
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | public function make() { |
| 43 | - $name = ($this->name)?:ucwords(str_replace("_"," ",$this->table)); |
|
| 43 | + $name = ($this->name) ?: ucwords(str_replace("_", " ", $this->table)); |
|
| 44 | 44 | |
| 45 | 45 | $template = file_get_contents(__DIR__."/../templates/FooBarController.stub"); |
| 46 | 46 | |
| 47 | 47 | //Replace table |
| 48 | - $template = str_replace("{table}",'"'.$this->table.'"', $template); |
|
| 48 | + $template = str_replace("{table}", '"'.$this->table.'"', $template); |
|
| 49 | 49 | |
| 50 | 50 | //Replace permalink |
| 51 | 51 | $template = str_replace("{permalink}", '"'.$this->table.'"', $template); |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | //Replace scaffolding |
| 57 | 57 | $fields = DB::getSchemaBuilder()->getColumnListing($this->table); |
| 58 | 58 | $scaffold = ""; |
| 59 | - foreach($fields as $field) { |
|
| 59 | + foreach ($fields as $field) { |
|
| 60 | 60 | $scaffold .= '$this->addText("'.$field.'");'."\n\t\t"; |
| 61 | 61 | } |
| 62 | 62 | $template = str_replace("{scaffolding}", $scaffold, $template); |