Skip to content

Commit a6e35ee

Browse files
committed
Formatting
1 parent aa3548f commit a6e35ee

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

database/migrations/create_permission_tables.php.stub

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22

3-
use Illuminate\Support\Facades\Schema;
4-
use Illuminate\Database\Schema\Blueprint;
53
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
66

77
return new class extends Migration
88
{
@@ -24,8 +24,8 @@ return new class extends Migration
2424
throw new \Exception('Error: team_foreign_key on config/permission.php not loaded. Run [php artisan config:clear] and try again.');
2525
}
2626

27-
Schema::create($tableNames['permissions'], function (Blueprint $table) {
28-
//$table->engine('InnoDB');
27+
Schema::create($tableNames['permissions'], static function (Blueprint $table) {
28+
// $table->engine('InnoDB');
2929
$table->bigIncrements('id'); // permission id
3030
$table->string('name'); // For MyISAM use string('name', 225); // (or 166 for InnoDB with Redundant/Compact row format)
3131
$table->string('guard_name'); // For MyISAM use string('guard_name', 25);
@@ -34,8 +34,8 @@ return new class extends Migration
3434
$table->unique(['name', 'guard_name']);
3535
});
3636

37-
Schema::create($tableNames['roles'], function (Blueprint $table) use ($teams, $columnNames) {
38-
//$table->engine('InnoDB');
37+
Schema::create($tableNames['roles'], static function (Blueprint $table) use ($teams, $columnNames) {
38+
// $table->engine('InnoDB');
3939
$table->bigIncrements('id'); // role id
4040
if ($teams || config('permission.testing')) { // permission.testing is a fix for sqlite testing
4141
$table->unsignedBigInteger($columnNames['team_foreign_key'])->nullable();
@@ -51,7 +51,7 @@ return new class extends Migration
5151
}
5252
});
5353

54-
Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames, $pivotPermission, $teams) {
54+
Schema::create($tableNames['model_has_permissions'], static function (Blueprint $table) use ($tableNames, $columnNames, $pivotPermission, $teams) {
5555
$table->unsignedBigInteger($pivotPermission);
5656

5757
$table->string('model_type');
@@ -75,7 +75,7 @@ return new class extends Migration
7575

7676
});
7777

78-
Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $columnNames, $pivotRole, $teams) {
78+
Schema::create($tableNames['model_has_roles'], static function (Blueprint $table) use ($tableNames, $columnNames, $pivotRole, $teams) {
7979
$table->unsignedBigInteger($pivotRole);
8080

8181
$table->string('model_type');
@@ -98,7 +98,7 @@ return new class extends Migration
9898
}
9999
});
100100

101-
Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames, $pivotRole, $pivotPermission) {
101+
Schema::create($tableNames['role_has_permissions'], static function (Blueprint $table) use ($tableNames, $pivotRole, $pivotPermission) {
102102
$table->unsignedBigInteger($pivotPermission);
103103
$table->unsignedBigInteger($pivotRole);
104104

0 commit comments

Comments
 (0)