@@ -128,7 +128,7 @@ |
||
| 128 | 128 | |
| 129 | 129 | /** |
| 130 | 130 | * @param Request $request |
| 131 | - * @param $tag |
|
| 131 | + * @param Tag $tag |
|
| 132 | 132 | */ |
| 133 | 133 | public function saveTag(Request $request, $tag) |
| 134 | 134 | { |
@@ -5,8 +5,6 @@ |
||
| 5 | 5 | use App\Tag; |
| 6 | 6 | use App\Transformers\TagTransformer; |
| 7 | 7 | use Illuminate\Http\Request; |
| 8 | - |
|
| 9 | -use App\Http\Requests; |
|
| 10 | 8 | use App\Http\Controllers\Controller; |
| 11 | 9 | use Illuminate\Support\Facades\Response; |
| 12 | 10 | |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | |
| 25 | 25 | public function index() |
| 26 | 26 | { |
| 27 | - // return Tag::all(); |
|
| 27 | + // return Tag::all(); |
|
| 28 | 28 | |
| 29 | 29 | $tags = Tag::all(); |
| 30 | 30 | |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | $tag = Tag::find($id); |
| 71 | 71 | //$tag = Tag::where('id' ,$id)->first(); |
| 72 | 72 | |
| 73 | - if( ! $tag){ |
|
| 73 | + if ( ! $tag) { |
|
| 74 | 74 | |
| 75 | 75 | return Response::json([ |
| 76 | 76 | |
@@ -5,8 +5,6 @@ |
||
| 5 | 5 | use App\Task; |
| 6 | 6 | use App\Transformers\TaskTransformer; |
| 7 | 7 | use Illuminate\Http\Request; |
| 8 | - |
|
| 9 | -use App\Http\Requests; |
|
| 10 | 8 | use App\Http\Controllers\Controller; |
| 11 | 9 | use Illuminate\Support\Facades\Response; |
| 12 | 10 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | public function index() |
| 31 | 31 | { |
| 32 | 32 | |
| 33 | - // return Task::all(); |
|
| 33 | + // return Task::all(); |
|
| 34 | 34 | |
| 35 | 35 | $tasks = Task::all(); |
| 36 | 36 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | return Response::json([ |
| 40 | 40 | |
| 41 | - $this -> taskTransformer->transformCollection($tasks), |
|
| 41 | + $this -> taskTransformer->transformCollection($tasks), |
|
| 42 | 42 | |
| 43 | 43 | |
| 44 | 44 | ], 200); |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | public function show($id) |
| 78 | 78 | { |
| 79 | - $task = Task::find($id); |
|
| 79 | + $task = Task::find($id); |
|
| 80 | 80 | |
| 81 | 81 | if( ! $task){ |
| 82 | 82 | return Response::json([ |
@@ -78,13 +78,13 @@ discard block |
||
| 78 | 78 | { |
| 79 | 79 | $task = Task::find($id); |
| 80 | 80 | |
| 81 | - if( ! $task){ |
|
| 81 | + if ( ! $task) { |
|
| 82 | 82 | return Response::json([ |
| 83 | 83 | 'error' => 'Tasks does not exist', |
| 84 | 84 | |
| 85 | 85 | 'code'=> 195 |
| 86 | 86 | |
| 87 | - ],404); |
|
| 87 | + ], 404); |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | return Response::json([ |
@@ -120,13 +120,13 @@ discard block |
||
| 120 | 120 | { |
| 121 | 121 | $task = Task::find($id); |
| 122 | 122 | |
| 123 | - if( ! $task){ |
|
| 123 | + if ( ! $task) { |
|
| 124 | 124 | return Response::json([ |
| 125 | 125 | 'error' => 'Tasks does not exist', |
| 126 | 126 | |
| 127 | 127 | 'code'=> 195 |
| 128 | 128 | |
| 129 | - ],404); |
|
| 129 | + ], 404); |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | $this->saveTask($request, $task); |
@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Created by PhpStorm. |
|
| 4 | - * User: oscar |
|
| 5 | - * Date: 11/01/16 |
|
| 6 | - * Time: 18:26 |
|
| 7 | - */ |
|
| 3 | + * Created by PhpStorm. |
|
| 4 | + * User: oscar |
|
| 5 | + * Date: 11/01/16 |
|
| 6 | + * Time: 18:26 |
|
| 7 | + */ |
|
| 8 | 8 | |
| 9 | 9 | namespace App\Transformers; |
| 10 | 10 | |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | public function transformCollection($items) |
| 16 | 16 | { |
| 17 | 17 | return array_map( |
| 18 | - [$this,'transform'], |
|
| 18 | + [$this, 'transform'], |
|
| 19 | 19 | $items->toArray() |
| 20 | 20 | ); |
| 21 | 21 | |
@@ -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 | } |
@@ -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 | } |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, |
| 18 | 18 | \Illuminate\Session\Middleware\StartSession::class, |
| 19 | 19 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, |
| 20 | - // \App\Http\Middleware\VerifyCsrfToken::class, |
|
| 20 | + // \App\Http\Middleware\VerifyCsrfToken::class, |
|
| 21 | 21 | ]; |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -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 | |