Completed
Push — master ( 5050df...77fab1 )
by Sherif
01:58
created
Database/Migrations/2016_06_01_000004_create_oauth_auth_codes_table.php 2 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -6,33 +6,33 @@
 block discarded – undo
6 6
 
7 7
 class CreateOauthAuthCodesTable extends Migration
8 8
 {
9
-    /**
10
-     * Run the migrations.
11
-     *
12
-     * @return void
13
-     */
14
-    public function up()
15
-    {
16
-        Schema::create('oauth_auth_codes', function (Blueprint $table) {
17
-            $table->string('id', 100)->primary();
18
-            $table->unsignedInteger('user_id');
19
-            $table->unsignedInteger('client_id');
20
-            $table->text('scopes')->nullable();
21
-            $table->boolean('revoked');
22
-            $table->dateTime('expires_at')->nullable();
9
+	/**
10
+	 * Run the migrations.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function up()
15
+	{
16
+		Schema::create('oauth_auth_codes', function (Blueprint $table) {
17
+			$table->string('id', 100)->primary();
18
+			$table->unsignedInteger('user_id');
19
+			$table->unsignedInteger('client_id');
20
+			$table->text('scopes')->nullable();
21
+			$table->boolean('revoked');
22
+			$table->dateTime('expires_at')->nullable();
23 23
 
24
-            $table->foreign('user_id')->references('id')->on('users');
25
-            $table->foreign('client_id')->references('id')->on('oauth_clients');
26
-        });
27
-    }
24
+			$table->foreign('user_id')->references('id')->on('users');
25
+			$table->foreign('client_id')->references('id')->on('oauth_clients');
26
+		});
27
+	}
28 28
 
29
-    /**
30
-     * Reverse the migrations.
31
-     *
32
-     * @return void
33
-     */
34
-    public function down()
35
-    {
36
-        Schema::drop('oauth_auth_codes');
37
-    }
29
+	/**
30
+	 * Reverse the migrations.
31
+	 *
32
+	 * @return void
33
+	 */
34
+	public function down()
35
+	{
36
+		Schema::drop('oauth_auth_codes');
37
+	}
38 38
 }
Please login to merge, or discard this 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('oauth_auth_codes', function (Blueprint $table) {
16
+        Schema::create('oauth_auth_codes', function(Blueprint $table) {
17 17
             $table->string('id', 100)->primary();
18 18
             $table->unsignedInteger('user_id');
19 19
             $table->unsignedInteger('client_id');
Please login to merge, or discard this patch.
Database/Migrations/2016_06_01_000001_create_oauth_clients_table.php 2 patches
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -6,35 +6,35 @@
 block discarded – undo
6 6
 
7 7
 class CreateOauthClientsTable extends Migration
8 8
 {
9
-    /**
10
-     * Run the migrations.
11
-     *
12
-     * @return void
13
-     */
14
-    public function up()
15
-    {
16
-        Schema::create('oauth_clients', function (Blueprint $table) {
17
-            $table->increments('id');
18
-            $table->unsignedInteger('user_id')->nullable();
19
-            $table->string('name');
20
-            $table->string('secret', 100);
21
-            $table->text('redirect');
22
-            $table->boolean('personal_access_client')->default(0);
23
-            $table->boolean('password_client')->default(0);
24
-            $table->boolean('revoked')->default(0);
25
-            $table->timestamps();
9
+	/**
10
+	 * Run the migrations.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function up()
15
+	{
16
+		Schema::create('oauth_clients', function (Blueprint $table) {
17
+			$table->increments('id');
18
+			$table->unsignedInteger('user_id')->nullable();
19
+			$table->string('name');
20
+			$table->string('secret', 100);
21
+			$table->text('redirect');
22
+			$table->boolean('personal_access_client')->default(0);
23
+			$table->boolean('password_client')->default(0);
24
+			$table->boolean('revoked')->default(0);
25
+			$table->timestamps();
26 26
 
27
-            $table->foreign('user_id')->references('id')->on('users');
28
-        });
29
-    }
27
+			$table->foreign('user_id')->references('id')->on('users');
28
+		});
29
+	}
30 30
 
31
-    /**
32
-     * Reverse the migrations.
33
-     *
34
-     * @return void
35
-     */
36
-    public function down()
37
-    {
38
-        Schema::drop('oauth_clients');
39
-    }
31
+	/**
32
+	 * Reverse the migrations.
33
+	 *
34
+	 * @return void
35
+	 */
36
+	public function down()
37
+	{
38
+		Schema::drop('oauth_clients');
39
+	}
40 40
 }
Please login to merge, or discard this 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('oauth_clients', function (Blueprint $table) {
16
+        Schema::create('oauth_clients', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->unsignedInteger('user_id')->nullable();
19 19
             $table->string('name');
Please login to merge, or discard this patch.
Database/Migrations/2016_06_01_000002_create_oauth_access_tokens_table.php 2 patches
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -6,35 +6,35 @@
 block discarded – undo
6 6
 
7 7
 class CreateOauthAccessTokensTable extends Migration
8 8
 {
9
-    /**
10
-     * Run the migrations.
11
-     *
12
-     * @return void
13
-     */
14
-    public function up()
15
-    {
16
-        Schema::create('oauth_access_tokens', function (Blueprint $table) {
17
-            $table->string('id', 100)->primary();
18
-            $table->unsignedInteger('user_id')->nullable();
19
-            $table->unsignedInteger('client_id');
20
-            $table->string('name')->nullable();
21
-            $table->text('scopes')->nullable();
22
-            $table->boolean('revoked');
23
-            $table->timestamps();
24
-            $table->dateTime('expires_at')->nullable();
9
+	/**
10
+	 * Run the migrations.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function up()
15
+	{
16
+		Schema::create('oauth_access_tokens', function (Blueprint $table) {
17
+			$table->string('id', 100)->primary();
18
+			$table->unsignedInteger('user_id')->nullable();
19
+			$table->unsignedInteger('client_id');
20
+			$table->string('name')->nullable();
21
+			$table->text('scopes')->nullable();
22
+			$table->boolean('revoked');
23
+			$table->timestamps();
24
+			$table->dateTime('expires_at')->nullable();
25 25
 
26
-            $table->foreign('user_id')->references('id')->on('users');
27
-            $table->foreign('client_id')->references('id')->on('oauth_clients');
28
-        });
29
-    }
26
+			$table->foreign('user_id')->references('id')->on('users');
27
+			$table->foreign('client_id')->references('id')->on('oauth_clients');
28
+		});
29
+	}
30 30
 
31
-    /**
32
-     * Reverse the migrations.
33
-     *
34
-     * @return void
35
-     */
36
-    public function down()
37
-    {
38
-        Schema::drop('oauth_access_tokens');
39
-    }
31
+	/**
32
+	 * Reverse the migrations.
33
+	 *
34
+	 * @return void
35
+	 */
36
+	public function down()
37
+	{
38
+		Schema::drop('oauth_access_tokens');
39
+	}
40 40
 }
Please login to merge, or discard this 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('oauth_access_tokens', function (Blueprint $table) {
16
+        Schema::create('oauth_access_tokens', function(Blueprint $table) {
17 17
             $table->string('id', 100)->primary();
18 18
             $table->unsignedInteger('user_id')->nullable();
19 19
             $table->unsignedInteger('client_id');
Please login to merge, or discard this patch.
Migrations/2016_06_01_000005_create_oauth_personal_access_clients_table.php 2 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -6,29 +6,29 @@
 block discarded – undo
6 6
 
7 7
 class CreateOauthPersonalAccessClientsTable extends Migration
8 8
 {
9
-    /**
10
-     * Run the migrations.
11
-     *
12
-     * @return void
13
-     */
14
-    public function up()
15
-    {
16
-        Schema::create('oauth_personal_access_clients', function (Blueprint $table) {
17
-            $table->increments('id');
18
-            $table->unsignedInteger('client_id');
19
-            $table->timestamps();
9
+	/**
10
+	 * Run the migrations.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function up()
15
+	{
16
+		Schema::create('oauth_personal_access_clients', function (Blueprint $table) {
17
+			$table->increments('id');
18
+			$table->unsignedInteger('client_id');
19
+			$table->timestamps();
20 20
             
21
-            $table->foreign('client_id')->references('id')->on('oauth_clients');
22
-        });
23
-    }
21
+			$table->foreign('client_id')->references('id')->on('oauth_clients');
22
+		});
23
+	}
24 24
 
25
-    /**
26
-     * Reverse the migrations.
27
-     *
28
-     * @return void
29
-     */
30
-    public function down()
31
-    {
32
-        Schema::drop('oauth_personal_access_clients');
33
-    }
25
+	/**
26
+	 * Reverse the migrations.
27
+	 *
28
+	 * @return void
29
+	 */
30
+	public function down()
31
+	{
32
+		Schema::drop('oauth_personal_access_clients');
33
+	}
34 34
 }
Please login to merge, or discard this 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('oauth_personal_access_clients', function (Blueprint $table) {
16
+        Schema::create('oauth_personal_access_clients', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->unsignedInteger('client_id');
19 19
             $table->timestamps();
Please login to merge, or discard this patch.
src/Modules/Roles/Database/Migrations/2015_12_22_145819_roles.php 2 patches
Indentation   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -5,67 +5,67 @@
 block discarded – undo
5 5
 
6 6
 class Roles extends Migration
7 7
 {
8
-    /**
9
-     * Run the migrations.
10
-     *
11
-     * @return void
12
-     */
13
-    public function up()
14
-    {
15
-        Schema::create('roles', function (Blueprint $table) {
16
-            $table->increments('id');
17
-            $table->string('name', 100)->unique();
18
-            $table->softDeletes();
19
-            $table->timestamps();
20
-        });
8
+	/**
9
+	 * Run the migrations.
10
+	 *
11
+	 * @return void
12
+	 */
13
+	public function up()
14
+	{
15
+		Schema::create('roles', function (Blueprint $table) {
16
+			$table->increments('id');
17
+			$table->string('name', 100)->unique();
18
+			$table->softDeletes();
19
+			$table->timestamps();
20
+		});
21 21
         
22
-        Schema::create('users_roles', function (Blueprint $table) {
23
-            $table->increments('id');
24
-            $table->unsignedInteger('user_id');
25
-            $table->unsignedInteger('role_id');
26
-            $table->softDeletes();
27
-            $table->timestamps();
22
+		Schema::create('users_roles', function (Blueprint $table) {
23
+			$table->increments('id');
24
+			$table->unsignedInteger('user_id');
25
+			$table->unsignedInteger('role_id');
26
+			$table->softDeletes();
27
+			$table->timestamps();
28 28
 
29
-            $table->foreign('user_id')->references('id')->on('users');
30
-            $table->foreign('role_id')->references('id')->on('roles');
31
-        });
29
+			$table->foreign('user_id')->references('id')->on('users');
30
+			$table->foreign('role_id')->references('id')->on('roles');
31
+		});
32 32
         
33
-        /**
34
-         * Create Default roles.
35
-         */
36
-        \DB::table('roles')->insert(
37
-            [
38
-                [
39
-                    'name'       => 'Admin',
40
-                    'created_at' => \DB::raw('NOW()'),
41
-                    'updated_at' => \DB::raw('NOW()')
42
-                ]
43
-            ]
44
-        );
33
+		/**
34
+		 * Create Default roles.
35
+		 */
36
+		\DB::table('roles')->insert(
37
+			[
38
+				[
39
+					'name'       => 'Admin',
40
+					'created_at' => \DB::raw('NOW()'),
41
+					'updated_at' => \DB::raw('NOW()')
42
+				]
43
+			]
44
+		);
45 45
         
46
-        /**
47
-         * Assign default users to admin roles.
48
-         */
49
-        $adminRoleId = \DB::table('roles')->where('name', 'admin')->select('id')->first()->id;
50
-        $adminUserId  = \DB::table('users')->where('email', '[email protected]')->select('id')->first()->id;
51
-        \DB::table('users_roles')->insert(
52
-            [
53
-            'user_id'    => $adminUserId,
54
-            'role_id'   => $adminRoleId,
55
-            'created_at' => \DB::raw('NOW()'),
56
-            'updated_at' => \DB::raw('NOW()')
57
-            ]
58
-        );
59
-    }
46
+		/**
47
+		 * Assign default users to admin roles.
48
+		 */
49
+		$adminRoleId = \DB::table('roles')->where('name', 'admin')->select('id')->first()->id;
50
+		$adminUserId  = \DB::table('users')->where('email', '[email protected]')->select('id')->first()->id;
51
+		\DB::table('users_roles')->insert(
52
+			[
53
+			'user_id'    => $adminUserId,
54
+			'role_id'   => $adminRoleId,
55
+			'created_at' => \DB::raw('NOW()'),
56
+			'updated_at' => \DB::raw('NOW()')
57
+			]
58
+		);
59
+	}
60 60
 
61
-    /**
62
-     * Reverse the migrations.
63
-     *
64
-     * @return void
65
-     */
66
-    public function down()
67
-    {
68
-        Schema::dropIfExists('roles');
69
-        Schema::dropIfExists('users_roles');
70
-    }
61
+	/**
62
+	 * Reverse the migrations.
63
+	 *
64
+	 * @return void
65
+	 */
66
+	public function down()
67
+	{
68
+		Schema::dropIfExists('roles');
69
+		Schema::dropIfExists('users_roles');
70
+	}
71 71
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@  discard block
 block discarded – undo
12 12
      */
13 13
     public function up()
14 14
     {
15
-        Schema::create('roles', function (Blueprint $table) {
15
+        Schema::create('roles', function(Blueprint $table) {
16 16
             $table->increments('id');
17 17
             $table->string('name', 100)->unique();
18 18
             $table->softDeletes();
19 19
             $table->timestamps();
20 20
         });
21 21
         
22
-        Schema::create('users_roles', function (Blueprint $table) {
22
+        Schema::create('users_roles', function(Blueprint $table) {
23 23
             $table->increments('id');
24 24
             $table->unsignedInteger('user_id');
25 25
             $table->unsignedInteger('role_id');
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
          * Assign default users to admin roles.
48 48
          */
49 49
         $adminRoleId = \DB::table('roles')->where('name', 'admin')->select('id')->first()->id;
50
-        $adminUserId  = \DB::table('users')->where('email', '[email protected]')->select('id')->first()->id;
50
+        $adminUserId = \DB::table('users')->where('email', '[email protected]')->select('id')->first()->id;
51 51
         \DB::table('users_roles')->insert(
52 52
             [
53 53
             'user_id'    => $adminUserId,
Please login to merge, or discard this patch.