Completed
Pull Request — master (#6)
by Jonathan
16:01 queued 06:12
created
database/migrations/2018_04_15_000008_create_capabilities_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
      */
15 15
     public function up()
16 16
     {
17
-        Schema::create($this->tablePrefix . 'capabilities', function (Blueprint $table) {
17
+        Schema::create($this->tablePrefix.'capabilities', function(Blueprint $table) {
18 18
             $table->increments('id');
19 19
             $table->string('name');
20 20
             $table->timestamps();
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function down()
32 32
     {
33
-        Schema::dropIfExists($this->tablePrefix . 'capabilities');
33
+        Schema::dropIfExists($this->tablePrefix.'capabilities');
34 34
     }
35 35
 
36 36
     protected function addCapabilities()
Please login to merge, or discard this patch.
database/migrations/2018_04_15_000000_alter_users_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::table('users', function (Blueprint $table) {
16
+        Schema::table('users', function(Blueprint $table) {
17 17
             $table->string('username')->after('id');
18 18
             $table->string('first_name')->after('username')->nullable();
19 19
             $table->string('phone')->after('password')->nullable();
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function down()
34 34
     {
35
-        Schema::table('users', function (Blueprint $table) {
35
+        Schema::table('users', function(Blueprint $table) {
36 36
             $table->renameColumn('username', 'name');
37 37
             $table->removeColumn('first_name');
38 38
             $table->removeColumn('last_name');
Please login to merge, or discard this patch.
database/migrations/2018_04_15_000007_create_privileges_table.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create($this->tablePrefix . 'privileges', function (Blueprint $table) {
16
+        Schema::create($this->tablePrefix.'privileges', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->unsignedInteger('domain_id');
19 19
             $table->unsignedInteger('role_id');
@@ -22,11 +22,11 @@  discard block
 block discarded – undo
22 22
 
23 23
             // Foreign keys
24 24
             $table->foreign('domain_id')
25
-                    ->references('id')->on($this->tablePrefix . 'domains')
25
+                    ->references('id')->on($this->tablePrefix.'domains')
26 26
                     ->onDelete('cascade');
27 27
 
28 28
             $table->foreign('role_id')
29
-                    ->references('id')->on($this->tablePrefix . 'roles')
29
+                    ->references('id')->on($this->tablePrefix.'roles')
30 30
                     ->onDelete('cascade');
31 31
 
32 32
             $table->foreign('user_id')
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
                     ->onDelete('cascade');
35 35
 
36 36
             // Unique keys
37
-            $table->unique(['domain_id', 'role_id', 'user_id']);
37
+            $table->unique([ 'domain_id', 'role_id', 'user_id' ]);
38 38
         });
39 39
     }
40 40
 
@@ -45,6 +45,6 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function down()
47 47
     {
48
-        Schema::dropIfExists($this->tablePrefix . 'privileges');
48
+        Schema::dropIfExists($this->tablePrefix.'privileges');
49 49
     }
50 50
 }
Please login to merge, or discard this patch.
database/migrations/2018_04_15_000012_create_blocks_table.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create($this->tablePrefix . 'blocks', function (Blueprint $table) {
16
+        Schema::create($this->tablePrefix.'blocks', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->unsignedInteger('module_id')->comment('Decrease queries');
19 19
             $table->unsignedInteger('tab_id');
@@ -25,11 +25,11 @@  discard block
 block discarded – undo
25 25
 
26 26
             // Foreign keys
27 27
             $table->foreign('module_id')
28
-                ->references('id')->on($this->tablePrefix . 'modules')
28
+                ->references('id')->on($this->tablePrefix.'modules')
29 29
                 ->onDelete('cascade');
30 30
 
31 31
             $table->foreign('tab_id')
32
-                    ->references('id')->on($this->tablePrefix . 'tabs')
32
+                    ->references('id')->on($this->tablePrefix.'tabs')
33 33
                     ->onDelete('cascade');
34 34
         });
35 35
     }
@@ -41,6 +41,6 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function down()
43 43
     {
44
-        Schema::dropIfExists($this->tablePrefix . 'blocks');
44
+        Schema::dropIfExists($this->tablePrefix.'blocks');
45 45
     }
46 46
 }
Please login to merge, or discard this patch.
database/migrations/2018_04_15_000014_create_displaytypes_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
      */
15 15
     public function up()
16 16
     {
17
-        Schema::create($this->tablePrefix . 'displaytypes', function (Blueprint $table) {
17
+        Schema::create($this->tablePrefix.'displaytypes', function(Blueprint $table) {
18 18
             $table->increments('id');
19 19
             $table->string('name');
20 20
             $table->string('class');
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function down()
33 33
     {
34
-        Schema::dropIfExists($this->tablePrefix . 'displaytypes');
34
+        Schema::dropIfExists($this->tablePrefix.'displaytypes');
35 35
     }
36 36
 
37 37
     protected function addDisplaytypes()
Please login to merge, or discard this patch.
database/migrations/2018_04_15_000026_create_menus_table.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      */
18 18
     public function up()
19 19
     {
20
-        Schema::create($this->tablePrefix . 'menus', function (Blueprint $table) {
20
+        Schema::create($this->tablePrefix.'menus', function(Blueprint $table) {
21 21
             $table->increments('id');
22 22
             $table->unsignedInteger('domain_id')->nullable();
23 23
             $table->unsignedInteger('user_id')->nullable();
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
             // Foreign keys
29 29
             $table->foreign('domain_id')
30
-                ->references('id')->on($this->tablePrefix . 'domains')
30
+                ->references('id')->on($this->tablePrefix.'domains')
31 31
                 ->onDelete('cascade');
32 32
 
33 33
             $table->foreign('user_id')
@@ -147,6 +147,6 @@  discard block
 block discarded – undo
147 147
      */
148 148
     public function down()
149 149
     {
150
-        Schema::dropIfExists($this->tablePrefix . 'menus');
150
+        Schema::dropIfExists($this->tablePrefix.'menus');
151 151
     }
152 152
 }
Please login to merge, or discard this patch.
database/migrations/2018_04_15_000005_create_profiles_table.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create($this->tablePrefix . 'profiles', function (Blueprint $table) {
16
+        Schema::create($this->tablePrefix.'profiles', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->string('name');
19 19
             $table->text('description')->nullable();
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
             // Foreign keys
25 25
             $table->foreign('domain_id')
26
-                    ->references('id')->on($this->tablePrefix . 'domains')
26
+                    ->references('id')->on($this->tablePrefix.'domains')
27 27
                     ->onDelete('cascade');
28 28
         });
29 29
     }
@@ -35,6 +35,6 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function down()
37 37
     {
38
-        Schema::dropIfExists($this->tablePrefix . 'profiles');
38
+        Schema::dropIfExists($this->tablePrefix.'profiles');
39 39
     }
40 40
 }
Please login to merge, or discard this patch.
database/migrations/2018_04_15_000004_create_roles_table.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create($this->tablePrefix . 'roles', function (Blueprint $table) {
16
+        Schema::create($this->tablePrefix.'roles', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->string('name');
19 19
             $table->text('description')->nullable();
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
 
25 25
             // Foreign keys
26 26
             $table->foreign('parent_id')
27
-                    ->references('id')->on($this->tablePrefix . 'roles');
27
+                    ->references('id')->on($this->tablePrefix.'roles');
28 28
 
29 29
             $table->foreign('domain_id')
30
-                    ->references('id')->on($this->tablePrefix . 'domains')
30
+                    ->references('id')->on($this->tablePrefix.'domains')
31 31
                     ->onDelete('cascade');
32 32
         });
33 33
     }
@@ -39,6 +39,6 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function down()
41 41
     {
42
-        Schema::dropIfExists($this->tablePrefix . 'roles');
42
+        Schema::dropIfExists($this->tablePrefix.'roles');
43 43
     }
44 44
 }
Please login to merge, or discard this patch.
database/migrations/2018_04_15_000009_create_permissions_table.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create($this->tablePrefix . 'permissions', function (Blueprint $table) {
16
+        Schema::create($this->tablePrefix.'permissions', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->unsignedInteger('module_id');
19 19
             $table->unsignedInteger('profile_id');
@@ -22,19 +22,19 @@  discard block
 block discarded – undo
22 22
 
23 23
             // Foreign keys
24 24
             $table->foreign('module_id')
25
-                    ->references('id')->on($this->tablePrefix . 'modules')
25
+                    ->references('id')->on($this->tablePrefix.'modules')
26 26
                     ->onDelete('cascade');
27 27
 
28 28
             $table->foreign('profile_id')
29
-                    ->references('id')->on($this->tablePrefix . 'profiles')
29
+                    ->references('id')->on($this->tablePrefix.'profiles')
30 30
                     ->onDelete('cascade');
31 31
 
32 32
             $table->foreign('capability_id')
33
-                    ->references('id')->on($this->tablePrefix . 'capabilities')
33
+                    ->references('id')->on($this->tablePrefix.'capabilities')
34 34
                     ->onDelete('cascade');
35 35
 
36 36
             // Unique keys
37
-            $table->unique(['module_id', 'profile_id', 'capability_id']);
37
+            $table->unique([ 'module_id', 'profile_id', 'capability_id' ]);
38 38
         });
39 39
     }
40 40
 
@@ -45,6 +45,6 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function down()
47 47
     {
48
-        Schema::dropIfExists($this->tablePrefix . 'permissions');
48
+        Schema::dropIfExists($this->tablePrefix.'permissions');
49 49
     }
50 50
 }
Please login to merge, or discard this patch.