@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | /** |
21 | 21 | * @param Requests\FlowRequest $request |
22 | - * @return mixed |
|
22 | + * @return \Illuminate\Http\JsonResponse |
|
23 | 23 | */ |
24 | 24 | public function store(Requests\FlowRequest $request) |
25 | 25 | { |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | /** |
32 | 32 | * @param Requests\FlowRequest $request |
33 | 33 | * @param $id |
34 | - * @return mixed |
|
34 | + * @return \Illuminate\Http\JsonResponse |
|
35 | 35 | */ |
36 | 36 | public function update(Requests\FlowRequest $request, $id) |
37 | 37 | { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | /** |
44 | 44 | * @param $id |
45 | - * @return mixed |
|
45 | + * @return \Illuminate\Http\JsonResponse |
|
46 | 46 | */ |
47 | 47 | public function destroy($id) |
48 | 48 | { |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function addMenuDefinition($class) |
30 | 30 | { |
31 | - if(class_exists($class)) { |
|
31 | + if (class_exists($class)) { |
|
32 | 32 | $this->groups->push($class); |
33 | 33 | } |
34 | 34 | } |
@@ -39,37 +39,37 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function render($group = 'sidebar') |
41 | 41 | { |
42 | - $this->groups->each(function($class){ |
|
42 | + $this->groups->each(function($class) { |
|
43 | 43 | $definition = app($class); |
44 | 44 | $menu = app('menu')->instance($definition->getInstance()); |
45 | - if($definition->isDropdown()) { |
|
45 | + if ($definition->isDropdown()) { |
|
46 | 46 | $menu->dropdown($definition->getName(), function($sub) use ($definition) { |
47 | 47 | $definition->items->each(function($item) use ($sub) { |
48 | - if($item['type'] == 'route') { |
|
48 | + if ($item['type'] == 'route') { |
|
49 | 49 | $sub->route($item['route'], $item['name'], [], 0, ['active' => $item['active-state']]) |
50 | 50 | ->hideWhen($item['ability']); |
51 | 51 | } |
52 | - if($item['type'] == 'header') { |
|
52 | + if ($item['type'] == 'header') { |
|
53 | 53 | $sub->addHeader($item['name']); |
54 | 54 | } |
55 | - if($item['type'] == 'url') { |
|
55 | + if ($item['type'] == 'url') { |
|
56 | 56 | $sub->url($item['url'], $item['name'], 0, ['active' => $item['active-state']]) |
57 | - ->hideWhen($item['ability']);; |
|
57 | + ->hideWhen($item['ability']); ; |
|
58 | 58 | } |
59 | 59 | }); |
60 | 60 | }); |
61 | - } else { |
|
61 | + }else { |
|
62 | 62 | $definition->items->each(function($item) use ($menu) { |
63 | - if($item['type'] == 'route') { |
|
63 | + if ($item['type'] == 'route') { |
|
64 | 64 | $menu->route($item['route'], $item['name'], [], 0, ['active' => $item['active-state']]) |
65 | 65 | ->hideWhen($item['ability']); |
66 | 66 | } |
67 | - if($item['type'] == 'header') { |
|
67 | + if ($item['type'] == 'header') { |
|
68 | 68 | $menu->addHeader($item['name']); |
69 | 69 | } |
70 | - if($item['type'] == 'url') { |
|
70 | + if ($item['type'] == 'url') { |
|
71 | 71 | $menu->url($item['url'], $item['name'], 0, ['active' => $item['active-state']]) |
72 | - ->hideWhen($item['ability']);; |
|
72 | + ->hideWhen($item['ability']); ; |
|
73 | 73 | } |
74 | 74 | }); |
75 | 75 | } |
@@ -116,11 +116,11 @@ |
||
116 | 116 | */ |
117 | 117 | protected function registerMenus() |
118 | 118 | { |
119 | - if(!app('menu')->instance('sidebar')) { |
|
120 | - app('menu')->create('sidebar', function ($menu) { |
|
119 | + if (!app('menu')->instance('sidebar')) { |
|
120 | + app('menu')->create('sidebar', function($menu) { |
|
121 | 121 | $menu->enableOrdering(); |
122 | 122 | }); |
123 | - $this->app->singleton('menu.service', function(){ |
|
123 | + $this->app->singleton('menu.service', function() { |
|
124 | 124 | return new MenuService(); |
125 | 125 | }); |
126 | 126 | } |
@@ -124,7 +124,7 @@ |
||
124 | 124 | { |
125 | 125 | $fieldTypes = app('field.types'); |
126 | 126 | if (!isset($fieldTypes->types[$type])) { |
127 | - throw new NotAcceptableHttpException('El field type ' . $type . ' no esta registrado'); |
|
127 | + throw new NotAcceptableHttpException('El field type '.$type.' no esta registrado'); |
|
128 | 128 | } |
129 | 129 | $this->fieldType = app($fieldTypes->types[$type]); |
130 | 130 | } |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | /** Notifications Routes **/ |
4 | -Route::group(['middleware' => ['web', 'auth'], 'namespace' => 'Hechoenlaravel\JarvisFoundation\Http\Controllers'], function () { |
|
4 | +Route::group(['middleware' => ['web', 'auth'], 'namespace' => 'Hechoenlaravel\JarvisFoundation\Http\Controllers'], function() { |
|
5 | 5 | Route::get('notifications', ['as' => 'notifications.index', 'uses' => 'NotificationsController@index']); |
6 | 6 | Route::get('notifications/{id}/read', ['as' => 'notifications.read', 'uses' => 'NotificationsController@read']); |
7 | - Route::group(['prefix' => 'api'], function(){ |
|
8 | - Route::group(['prefix' => 'core'], function(){ |
|
7 | + Route::group(['prefix' => 'api'], function() { |
|
8 | + Route::group(['prefix' => 'core'], function() { |
|
9 | 9 | Route::resource('entity/{id}/fields', 'Core\FieldsController', ['only' => ['index', 'store', 'update', 'destroy']]); |
10 | 10 | Route::put('entity/{id}/order-fields', 'Core\FieldsController@reOrderFieldId'); |
11 | 11 | Route::get('field-type/{type}/form', 'Core\FieldsController@fieldTypeForm'); |