@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | */ |
| 114 | 114 | public function checkRole($role) |
| 115 | 115 | { |
| 116 | - return $this->getRoles()->contains(function ($value) use ($role) { |
|
| 116 | + return $this->getRoles()->contains(function($value) use ($role) { |
|
| 117 | 117 | return $role == $value->id || Str::is($role, $value->slug); |
| 118 | 118 | }); |
| 119 | 119 | } |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | */ |
| 294 | 294 | public function checkPermission($permission) |
| 295 | 295 | { |
| 296 | - return $this->getPermissions()->contains(function ($value) use ($permission) { |
|
| 296 | + return $this->getPermissions()->contains(function($value) use ($permission) { |
|
| 297 | 297 | return $permission == $value->id || Str::is($permission, $value->slug); |
| 298 | 298 | }); |
| 299 | 299 | } |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | $tableCheck = Schema::connection($connection)->hasTable($table); |
| 19 | 19 | |
| 20 | 20 | if (!$tableCheck) { |
| 21 | - Schema::connection($connection)->create($table, function (Blueprint $table) { |
|
| 21 | + Schema::connection($connection)->create($table, function(Blueprint $table) { |
|
| 22 | 22 | $table->increments('id')->unsigned(); |
| 23 | 23 | $table->string('name'); |
| 24 | 24 | $table->string('slug')->unique(); |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | $tableCheck = Schema::connection($connection)->hasTable($table); |
| 19 | 19 | |
| 20 | 20 | if (!$tableCheck) { |
| 21 | - Schema::connection($connection)->create($table, function (Blueprint $table) { |
|
| 21 | + Schema::connection($connection)->create($table, function(Blueprint $table) { |
|
| 22 | 22 | $table->increments('id')->unsigned(); |
| 23 | 23 | $table->string('name'); |
| 24 | 24 | $table->string('slug')->unique(); |
@@ -12,6 +12,6 @@ |
||
| 12 | 12 | 'as' => 'laravelroles::', |
| 13 | 13 | 'namespace' => 'jeremykenedy\LaravelRoles\App\Http\Controllers\Api', |
| 14 | 14 | 'prefix' => 'api', |
| 15 | -], function () { |
|
| 15 | +], function() { |
|
| 16 | 16 | Route::apiResource('roles-api', 'LaravelRolesApiController'); |
| 17 | 17 | }); |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | $tableCheck = Schema::connection($connection)->hasTable($table); |
| 21 | 21 | |
| 22 | 22 | if (!$tableCheck) { |
| 23 | - Schema::connection($connection)->create($table, function (Blueprint $table) use ($permissionsTable, $rolesTable) { |
|
| 23 | + Schema::connection($connection)->create($table, function(Blueprint $table) use ($permissionsTable, $rolesTable) { |
|
| 24 | 24 | $table->increments('id')->unsigned(); |
| 25 | 25 | $table->integer('permission_id')->unsigned()->index(); |
| 26 | 26 | $table->foreign('permission_id')->references('id')->on($permissionsTable)->onDelete('cascade'); |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | $tableCheck = Schema::connection($connection)->hasTable($table); |
| 20 | 20 | |
| 21 | 21 | if (!$tableCheck) { |
| 22 | - Schema::connection($connection)->create($table, function (Blueprint $table) use ($rolesTable) { |
|
| 22 | + Schema::connection($connection)->create($table, function(Blueprint $table) use ($rolesTable) { |
|
| 23 | 23 | $table->increments('id')->unsigned(); |
| 24 | 24 | $table->integer('role_id')->unsigned()->index(); |
| 25 | 25 | $table->foreign('role_id')->references('id')->on($rolesTable)->onDelete('cascade'); |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | $userTable = app(config('auth.providers.users.model'))->getTable(); |
| 21 | 21 | |
| 22 | 22 | if (!$tableCheck) { |
| 23 | - Schema::connection($connection)->create($table, function (Blueprint $table) use ($permissionsTable, $userTable) { |
|
| 23 | + Schema::connection($connection)->create($table, function(Blueprint $table) use ($permissionsTable, $userTable) { |
|
| 24 | 24 | $table->increments('id')->unsigned(); |
| 25 | 25 | $table->integer('permission_id')->unsigned()->index(); |
| 26 | 26 | $table->foreign('permission_id')->references('id')->on($permissionsTable)->onDelete('cascade'); |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | 'as' => 'laravelroles::', |
| 12 | 12 | 'namespace' => 'jeremykenedy\LaravelRoles\App\Http\Controllers', |
| 13 | 13 | 'prefix' => config('roles.GUIRoutesPrefix'), |
| 14 | -], function () { |
|
| 14 | +], function() { |
|
| 15 | 15 | |
| 16 | 16 | // Dashboards and CRUD Routes |
| 17 | 17 | Route::resource('roles', 'LaravelRolesController'); |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | * |
| 62 | 62 | * @see \Illuminate\Database\Console\Migrations\BaseCommand |
| 63 | 63 | */ |
| 64 | - '--path' => realpath(__DIR__ . '/../src/Database/Migrations'), |
|
| 64 | + '--path' => realpath(__DIR__.'/../src/Database/Migrations'), |
|
| 65 | 65 | '--realpath' => true, |
| 66 | 66 | ]; |
| 67 | 67 | } |