Completed
Push — master ( 99cddd...b66556 )
by
unknown
25:20 queued 10:23
created
app/Providers/AuthServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         // should return either a User instance or null. You're free to obtain
31 31
         // the User instance via an API token or any other method necessary.
32 32
 
33
-        $this->app['auth']->viaRequest('api', function ($request) {
33
+        $this->app[ 'auth' ]->viaRequest('api', function($request) {
34 34
             if ($request->input('api_token')) {
35 35
                 return User::where('api_token', $request->input('api_token'))->first();
36 36
             }
Please login to merge, or discard this patch.
routes/web.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@  discard block
 block discarded – undo
7 7
 */
8 8
 
9 9
 $api = app('Dingo\Api\Routing\Router');
10
-$api->version('v1', function ($api) {
10
+$api->version('v1', function($api) {
11 11
 
12 12
     /**
13 13
      * Welcome message.
14 14
      */
15
-    $api->get('/', function () {
15
+    $api->get('/', function() {
16 16
         return 'LaCMS API';
17 17
     });
18 18
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
         // 'middleware' => 'api:auth', // @todo
24 24
         'prefix' => 'images',
25 25
         'namespace' => 'App\Http\Controllers\Api\V1',
26
-    ], function ($api) {
26
+    ], function($api) {
27 27
         $api->get('/', 'ImagesController@index');
28 28
         $api->post('/', 'ImagesController@store');
29 29
         $api->get('/{id}', 'ImagesController@show');
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         // 'middleware' => 'foo',
41 41
         'prefix' => 'posts',
42 42
         'namespace' => 'App\Http\Controllers\Api\V1',
43
-    ], function ($api) {
43
+    ], function($api) {
44 44
         $api->get('/', 'PostsController@index');
45 45
         $api->post('/', 'PostsController@store');
46 46
         $api->get('/{id}', 'PostsController@show');
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         // 'middleware' => 'foo',
60 60
         'prefix' => 'authors',
61 61
         'namespace' => 'App\Http\Controllers\Api\V1',
62
-    ], function ($api) {
62
+    ], function($api) {
63 63
         $api->get('/', 'AuthorsController@index');
64 64
         $api->post('/', 'AuthorsController@store');
65 65
         $api->get('/{id}', 'AuthorsController@show');
Please login to merge, or discard this patch.
bootstrap/app.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
 
97 97
 $app->router->group([
98 98
     'namespace' => 'App\Http\Controllers',
99
-], function ($router) {
99
+], function($router) {
100 100
     require __DIR__.'/../routes/web.php';
101 101
 });
102 102
 
Please login to merge, or discard this patch.
database/migrations/2018_02_11_113322_create_authors_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('authors', function (Blueprint $table) {
16
+        Schema::create('authors', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->string('first_name');
19 19
             $table->string('last_name');
Please login to merge, or discard this patch.
database/migrations/2018_03_16_080732_create_images_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('images', function (Blueprint $table) {
16
+        Schema::create('images', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->integer('post_id')->unsigned();
19 19
             $table->string('url');
Please login to merge, or discard this patch.
database/migrations/2018_02_11_112643_create_posts_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('posts', function (Blueprint $table) {
16
+        Schema::create('posts', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->integer('author_id')->unsigned();
19 19
             $table->string('title');
Please login to merge, or discard this patch.
database/factories/ModelFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 |
12 12
 */
13 13
 
14
-$factory->define(App\User::class, function (Faker\Generator $faker) {
14
+$factory->define(App\User::class, function(Faker\Generator $faker) {
15 15
     return [
16 16
         'name' => $faker->name,
17 17
         'email' => $faker->email,
Please login to merge, or discard this patch.
app/Http/Controllers/Api/V1/PostsController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     public function index()
26 26
     {
27 27
         $posts = Redis::get('posts');
28
-        if (! $posts) {
28
+        if (!$posts) {
29 29
             $posts = Post::with('author')->all();
30 30
         }
31 31
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     public function show($id)
48 48
     {
49 49
         $post = Redis::get('posts:'.$id);
50
-        if (! $post) {
50
+        if (!$post) {
51 51
             $post = Post::with('author')->findOrFail($id);
52 52
         }
53 53
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     public function author($id)
98 98
     {
99 99
         $author = Redis::get('posts:authors:'.$id);
100
-        if (! $author) {
100
+        if (!$author) {
101 101
             $author = Post::findOrFail($id)->author;
102 102
         }
103 103
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     public function images($id)
115 115
     {
116 116
         $images = Redis::get('posts:images:'.$id);
117
-        if (! $images) {
117
+        if (!$images) {
118 118
             $images = Post::findOrFail($id)->images;
119 119
         }
120 120
 
Please login to merge, or discard this patch.