Completed
Push — master ( 5da3c5...1ddebf )
by Manu
50:21 queued 35:23
created
database/migrations/2017_11_27_152221_create_posts_table.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,14 +11,14 @@
 block discarded – undo
11 11
      *
12 12
      * @return void
13 13
      */
14
-     public function up() {
15
-   Schema::create('posts', function (Blueprint $table) {
16
-     $table->increments('id');
17
-     $table->string('title');
18
-     $table->text('description');
19
-     $table->timestamps();
20
-   });
21
- }
14
+        public function up() {
15
+    Schema::create('posts', function (Blueprint $table) {
16
+        $table->increments('id');
17
+        $table->string('title');
18
+        $table->text('description');
19
+        $table->timestamps();
20
+    });
21
+    }
22 22
 
23 23
 
24 24
     /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      * @return void
13 13
      */
14 14
      public function up() {
15
-   Schema::create('posts', function (Blueprint $table) {
15
+   Schema::create('posts', function(Blueprint $table) {
16 16
      $table->increments('id');
17 17
      $table->string('title');
18 18
      $table->text('description');
Please login to merge, or discard this patch.
migrations/2017_11_13_130436_create_social_twitter_accounts_table.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,10 +16,10 @@
 block discarded – undo
16 16
     public function up()
17 17
     {
18 18
         Schema::create('social_twitter_accounts', function (Blueprint $table) {
19
-          $table->integer('user_id');
20
-          $table->string('provider_user_id');
21
-          $table->string('provider');
22
-          $table->timestamps();
19
+            $table->integer('user_id');
20
+            $table->string('provider_user_id');
21
+            $table->string('provider');
22
+            $table->timestamps();
23 23
         });
24 24
     }
25 25
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      */
16 16
     public function up()
17 17
     {
18
-        Schema::create('social_twitter_accounts', function (Blueprint $table) {
18
+        Schema::create('social_twitter_accounts', function(Blueprint $table) {
19 19
           $table->integer('user_id');
20 20
           $table->string('provider_user_id');
21 21
           $table->string('provider');
Please login to merge, or discard this patch.
migrations/2017_11_17_153801_create_social_facebook_accounts_table.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,10 +16,10 @@
 block discarded – undo
16 16
     public function up()
17 17
     {
18 18
         Schema::create('social_facebook_accounts', function (Blueprint $table) {
19
-          $table->integer('user_id');
20
-          $table->string('provider_user_id');
21
-          $table->string('provider');
22
-          $table->timestamps();
19
+            $table->integer('user_id');
20
+            $table->string('provider_user_id');
21
+            $table->string('provider');
22
+            $table->timestamps();
23 23
         });
24 24
     }
25 25
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      */
16 16
     public function up()
17 17
     {
18
-        Schema::create('social_facebook_accounts', function (Blueprint $table) {
18
+        Schema::create('social_facebook_accounts', function(Blueprint $table) {
19 19
           $table->integer('user_id');
20 20
           $table->string('provider_user_id');
21 21
           $table->string('provider');
Please login to merge, or discard this patch.
src/Http/Controllers/PostController.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@  discard block
 block discarded – undo
8 8
 
9 9
 class PostController extends Controller {
10 10
 
11
-  /**
12
-   * Saves a new post to the database
13
-   */
14
-  public function store(Request $request) {
11
+    /**
12
+     * Saves a new post to the database
13
+     */
14
+    public function store(Request $request) {
15 15
     // ...
16 16
     // validation can be done here before saving
17 17
     // with $this->validate($request, $rules)
@@ -30,5 +30,5 @@  discard block
 block discarded – undo
30 30
 
31 31
     // return post as response, Laravel automatically serializes this to JSON
32 32
     return response($post, 201);
33
-  }
33
+    }
34 34
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     // ...
19 19
 
20 20
     // get data to save in an associative array using $request->only()
21
-    $data = $request->only(['title', 'description']);
21
+    $data = $request->only([ 'title', 'description' ]);
22 22
 
23 23
     //  save post and assign return value of created post to $post array
24 24
     $post = Post::create($data);
Please login to merge, or discard this patch.