Completed
Push — master ( f8d969...239ffe )
by Turcan
09:40
created
app/admin/User.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,20 +6,20 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.
app/admin/Training_Resource.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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');
Please login to merge, or discard this patch.
app/Training_Resource.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -92,13 +92,13 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.