@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Author: Nil Portugués Calderó <[email protected]> |
|
4 | - * Date: 12/9/15 |
|
5 | - * Time: 5:24 PM. |
|
6 | - * |
|
7 | - * For the full copyright and license information, please view the LICENSE |
|
8 | - * file that was distributed with this source code. |
|
9 | - */ |
|
3 | + * Author: Nil Portugués Calderó <[email protected]> |
|
4 | + * Date: 12/9/15 |
|
5 | + * Time: 5:24 PM. |
|
6 | + * |
|
7 | + * For the full copyright and license information, please view the LICENSE |
|
8 | + * file that was distributed with this source code. |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | namespace NilPortugues\Tests\Laravel5\JsonApi; |
12 | 12 |
@@ -88,7 +88,7 @@ |
||
88 | 88 | |
89 | 89 | $router->group( |
90 | 90 | ['prefix' => 'api/v1/', 'namespace' => 'NilPortugues\Tests\App\Controller'], |
91 | - function () use ($router) { |
|
91 | + function() use ($router) { |
|
92 | 92 | $router->post('employees', ['as' => 'employees.post', 'uses' => 'EmployeesController@postAction']); |
93 | 93 | $router->get('employees', ['as' => 'employees.list', 'uses' => 'EmployeesController@listAction']); |
94 | 94 | $router->get('employees/{id}', ['as' => 'employees.get', 'uses' => 'EmployeesController@getAction']); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | protected function createResourceCallable() |
41 | 41 | { |
42 | - $createOrderResource = function (Model $model, array $data) { |
|
42 | + $createOrderResource = function(Model $model, array $data) { |
|
43 | 43 | if (!empty($data['relationships']['order']['data'])) { |
44 | 44 | $orderData = $data['relationships']['order']['data']; |
45 | 45 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | } |
55 | 55 | }; |
56 | 56 | |
57 | - return function (array $data, array $values, ErrorBag $errorBag) use ($createOrderResource) { |
|
57 | + return function(array $data, array $values, ErrorBag $errorBag) use ($createOrderResource) { |
|
58 | 58 | |
59 | 59 | $attributes = []; |
60 | 60 | foreach ($values as $name => $value) { |
@@ -90,13 +90,13 @@ discard block |
||
90 | 90 | { |
91 | 91 | $resource = new ListResource($this->serializer); |
92 | 92 | |
93 | - $totalAmount = function () use ($request) { |
|
93 | + $totalAmount = function() use ($request) { |
|
94 | 94 | $id = (new Orders())->getKeyName(); |
95 | 95 | |
96 | 96 | return Orders::query()->where('employee_id', '=', $request->employee_id)->get([$id])->count(); |
97 | 97 | }; |
98 | 98 | |
99 | - $results = function () use ($request) { |
|
99 | + $results = function() use ($request) { |
|
100 | 100 | return EloquentHelper::paginate( |
101 | 101 | $this->serializer, |
102 | 102 | Orders::query()->where('employee_id', '=', $request->employee_id) |
@@ -35,7 +35,7 @@ |
||
35 | 35 | */ |
36 | 36 | public function map(Router $router) |
37 | 37 | { |
38 | - $router->group(['namespace' => $this->namespace], function ($router) { |
|
38 | + $router->group(['namespace' => $this->namespace], function($router) { |
|
39 | 39 | require app_path('Http/routes.php'); |
40 | 40 | }); |
41 | 41 | } |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Author: Nil Portugués Calderó <[email protected]> |
|
4 | - * Date: 11/14/15 |
|
5 | - * Time: 12:24 AM. |
|
6 | - * |
|
7 | - * For the full copyright and license information, please view the LICENSE |
|
8 | - * file that was distributed with this source code. |
|
9 | - */ |
|
3 | + * Author: Nil Portugués Calderó <[email protected]> |
|
4 | + * Date: 11/14/15 |
|
5 | + * Time: 12:24 AM. |
|
6 | + * |
|
7 | + * For the full copyright and license information, please view the LICENSE |
|
8 | + * file that was distributed with this source code. |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | namespace NilPortugues\Tests\App\Transformers; |
12 | 12 |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Author: Nil Portugués Calderó <[email protected]> |
|
4 | - * Date: 11/14/15 |
|
5 | - * Time: 12:24 AM. |
|
6 | - * |
|
7 | - * For the full copyright and license information, please view the LICENSE |
|
8 | - * file that was distributed with this source code. |
|
9 | - */ |
|
3 | + * Author: Nil Portugués Calderó <[email protected]> |
|
4 | + * Date: 11/14/15 |
|
5 | + * Time: 12:24 AM. |
|
6 | + * |
|
7 | + * For the full copyright and license information, please view the LICENSE |
|
8 | + * file that was distributed with this source code. |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | namespace NilPortugues\Tests\App\Transformers; |
12 | 12 |