@@ -26,7 +26,7 @@ |
||
| 26 | 26 | /** |
| 27 | 27 | * Show the application welcome screen to the user. |
| 28 | 28 | * |
| 29 | - * @return Response |
|
| 29 | + * @return \Illuminate\View\View |
|
| 30 | 30 | */ |
| 31 | 31 | public function index() |
| 32 | 32 | { |
@@ -6,20 +6,20 @@ |
||
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | 8 | // Create admin model from User class with title and url alias |
| 9 | -Admin::model('\User')->title('Users')->as('users-alias-name')->denyCreating(function () |
|
| 9 | +Admin::model('\User')->title('Users')->as('users-alias-name')->denyCreating(function() |
|
| 10 | 10 | { |
| 11 | 11 | // Deny creating on thursday |
| 12 | 12 | return date('w') == 4; |
| 13 | -})->denyEditingAndDeleting(function ($instance) |
|
| 13 | +})->denyEditingAndDeleting(function($instance) |
|
| 14 | 14 | { |
| 15 | 15 | // deny editing and deleting rows when this is true |
| 16 | 16 | return ($instance->id <= 2) || ($instance->email == 'admin'); |
| 17 | -})->columns(function () |
|
| 17 | +})->columns(function() |
|
| 18 | 18 | { |
| 19 | 19 | // Describing columns for table view |
| 20 | 20 | Column::string('name', 'Name'); |
| 21 | 21 | Column::string('email', 'Email'); |
| 22 | -})->form(function () |
|
| 22 | +})->form(function() |
|
| 23 | 23 | { |
| 24 | 24 | // Describing elements in create and editing forms |
| 25 | 25 | FormItem::text('name', 'Name'); |
@@ -1,9 +1,9 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -Admin::model('\App\Training_Resource')->title('Recursos de formació')->with()->filters(function () |
|
| 3 | +Admin::model('\App\Training_Resource')->title('Recursos de formació')->with()->filters(function() |
|
| 4 | 4 | { |
| 5 | 5 | |
| 6 | -})->columns(function () |
|
| 6 | +})->columns(function() |
|
| 7 | 7 | { |
| 8 | 8 | //Column::image('training_resource_thumbnail'); |
| 9 | 9 | Column::string('training_resource_id', 'ID'); |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | //Column::string('training_resource_name', 'Pare')->append(Column::where('training_resource_id', '=', 'training_resource_parentResourceId')); |
| 15 | 15 | Column::string('parent.training_resource_name', 'Pare'); |
| 16 | 16 | |
| 17 | -})->form(function () |
|
| 17 | +})->form(function() |
|
| 18 | 18 | { |
| 19 | 19 | FormItem::text('training_resource_name', 'Nom')->required(); |
| 20 | 20 | FormItem::text('training_resource_short_name', 'Nom Curt'); |
@@ -92,13 +92,13 @@ |
||
| 92 | 92 | |
| 93 | 93 | public function getDates() |
| 94 | 94 | { |
| 95 | - return array_merge(parent::getDates(), ['training_resource_entryDate','training_resource_last_update']); |
|
| 95 | + return array_merge(parent::getDates(), ['training_resource_entryDate', 'training_resource_last_update']); |
|
| 96 | 96 | } |
| 97 | 97 | public function pare($pare) |
| 98 | 98 | { |
| 99 | 99 | $this->training_resource()->detach(); |
| 100 | - if ( ! $pare) return; |
|
| 101 | - if ( ! $this->exists) $this->save(); |
|
| 100 | + if (!$pare) return; |
|
| 101 | + if (!$this->exists) $this->save(); |
|
| 102 | 102 | $this->training_resource()->attach($pare); |
| 103 | 103 | } |
| 104 | 104 | |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | /** |
| 27 | 27 | * Show the application welcome screen to the user. |
| 28 | 28 | * |
| 29 | - * @return Response |
|
| 29 | + * @return \Illuminate\View\View |
|
| 30 | 30 | */ |
| 31 | 31 | public function index() |
| 32 | 32 | { |