@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | /** |
| 28 | 28 | * Display a listing of the resource. |
| 29 | 29 | * |
| 30 | - * @return \Illuminate\Http\Response |
|
| 30 | + * @return \Illuminate\Http\JsonResponse |
|
| 31 | 31 | */ |
| 32 | 32 | public function index() |
| 33 | 33 | { |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | * Display the specified resource. |
| 74 | 74 | * |
| 75 | 75 | * @param int $id |
| 76 | - * @return \Illuminate\Http\Response |
|
| 76 | + * @return \Illuminate\Http\JsonResponse |
|
| 77 | 77 | */ |
| 78 | 78 | public function show($id) |
| 79 | 79 | { |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | // 2. No way to attach metadata SOLVED: |
| 84 | 84 | $tag = Tag::find($id); |
| 85 | 85 | |
| 86 | - if ( !$tag ) { |
|
| 86 | + if (!$tag) { |
|
| 87 | 87 | Response::json([ |
| 88 | 88 | 'error' => 'Tag does not exists' |
| 89 | 89 | ], |
@@ -4,8 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use App\Task; |
| 6 | 6 | use Illuminate\Http\Request; |
| 7 | - |
|
| 8 | -use App\Http\Requests; |
|
| 9 | 7 | use App\Http\Controllers\Controller; |
| 10 | 8 | |
| 11 | 9 | class TaskController extends Controller |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | /** |
| 14 | 14 | * Display a listing of the resource. |
| 15 | 15 | * |
| 16 | - * @return \Illuminate\Http\Response |
|
| 16 | + * @return \Illuminate\Database\Eloquent\Collection |
|
| 17 | 17 | */ |
| 18 | 18 | public function index() |
| 19 | 19 | { |
@@ -4,8 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use App\Task; |
| 6 | 6 | use Illuminate\Http\Request; |
| 7 | - |
|
| 8 | -use App\Http\Requests; |
|
| 9 | 7 | use App\Http\Controllers\Controller; |
| 10 | 8 | |
| 11 | 9 | class TaskController extends Controller |
@@ -116,7 +116,7 @@ |
||
| 116 | 116 | |
| 117 | 117 | private function transformCollection($tasks) |
| 118 | 118 | { |
| 119 | - return array_map([$this,'transform'], |
|
| 119 | + return array_map([$this, 'transform'], |
|
| 120 | 120 | $tasks->toArray() |
| 121 | 121 | ); |
| 122 | 122 | // $result = array(); |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | */ |
| 38 | 38 | public function map(Router $router) |
| 39 | 39 | { |
| 40 | - $router->group(['namespace' => $this->namespace], function ($router) { |
|
| 40 | + $router->group(['namespace' => $this->namespace], function($router) { |
|
| 41 | 41 | require app_path('Http/routes.php'); |
| 42 | 42 | }); |
| 43 | 43 | } |
@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Created by PhpStorm. |
|
| 4 | - * User: sergi |
|
| 5 | - * Date: 11/01/16 |
|
| 6 | - * Time: 18:25 |
|
| 7 | - */ |
|
| 3 | + * Created by PhpStorm. |
|
| 4 | + * User: sergi |
|
| 5 | + * Date: 11/01/16 |
|
| 6 | + * Time: 18:25 |
|
| 7 | + */ |
|
| 8 | 8 | |
| 9 | 9 | namespace App\Transformers; |
| 10 | 10 | |
@@ -25,6 +25,6 @@ |
||
| 25 | 25 | protected function schedule(Schedule $schedule) |
| 26 | 26 | { |
| 27 | 27 | $schedule->command('inspire') |
| 28 | - ->hourly(); |
|
| 28 | + ->hourly(); |
|
| 29 | 29 | } |
| 30 | 30 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | | |
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | -Route::get('/', function () { |
|
| 14 | +Route::get('/', function() { |
|
| 15 | 15 | return view('welcome'); |
| 16 | 16 | }); |
| 17 | 17 | |
@@ -116,7 +116,7 @@ |
||
| 116 | 116 | |
| 117 | 117 | private function transformCollection($tasks) |
| 118 | 118 | { |
| 119 | - return array_map([$this,'transform'], |
|
| 119 | + return array_map([$this, 'transform'], |
|
| 120 | 120 | $tasks->toArray() |
| 121 | 121 | ); |
| 122 | 122 | // $result = array(); |