@@ -23,7 +23,7 @@ |
||
| 23 | 23 | { |
| 24 | 24 | Schema::defaultStringLength(191); |
| 25 | 25 | |
| 26 | - $this->loadRoutesFrom(__DIR__ . '/../../src/Demo/Http/routes/demoRoutes.php'); |
|
| 27 | - $this->loadViewsFrom(__DIR__ . '/../../src/Demo/views', 'demo'); |
|
| 26 | + $this->loadRoutesFrom(__DIR__.'/../../src/Demo/Http/routes/demoRoutes.php'); |
|
| 27 | + $this->loadViewsFrom(__DIR__.'/../../src/Demo/views', 'demo'); |
|
| 28 | 28 | } |
| 29 | 29 | } |
@@ -75,6 +75,6 @@ |
||
| 75 | 75 | |
| 76 | 76 | public function getShortNameAttribute() |
| 77 | 77 | { |
| 78 | - return $this->firstname . ' ' . substr($this->lastname, 0, 1) . '.'; |
|
| 78 | + return $this->firstname.' '.substr($this->lastname, 0, 1).'.'; |
|
| 79 | 79 | } |
| 80 | 80 | } |
@@ -19,15 +19,15 @@ |
||
| 19 | 19 | { |
| 20 | 20 | $abilities = ['view', 'create', 'update', 'delete']; |
| 21 | 21 | |
| 22 | - return array_map(function ($val) use ($scope) { |
|
| 23 | - return $val . '-'. $scope; |
|
| 22 | + return array_map(function($val) use ($scope) { |
|
| 23 | + return $val.'-'.$scope; |
|
| 24 | 24 | }, $abilities); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | public static function getPermissionsForIndex() |
| 28 | 28 | { |
| 29 | 29 | $permissions = $temp = []; |
| 30 | - self::all()->each(function ($permission) use (&$permissions, &$temp) { |
|
| 30 | + self::all()->each(function($permission) use (&$permissions, &$temp) { |
|
| 31 | 31 | $model = explode("_", $permission->name, 2)[1]; |
| 32 | 32 | $temp[$model][$permission->id] = explode("_", $permission->name, 2)[0]; |
| 33 | 33 | $permissions = $temp; |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | Permission::findOrCreate($permission, 'chief'); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | - $this->info('Permissions ' . implode(', ', $permissions) . ' created.'); |
|
| 42 | + $this->info('Permissions '.implode(', ', $permissions).' created.'); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -56,9 +56,9 @@ discard block |
||
| 56 | 56 | foreach ($roleNames as $roleName) { |
| 57 | 57 | if ($role = Role::where('name', trim($roleName))->first()) { |
| 58 | 58 | $role->syncPermissions($permissions); |
| 59 | - $this->info('Role ' . $roleName . ' assigned the given permissions.'); |
|
| 60 | - } else { |
|
| 61 | - $this->warn('Role not found by name ' . $roleName . '!'); |
|
| 59 | + $this->info('Role '.$roleName.' assigned the given permissions.'); |
|
| 60 | + }else { |
|
| 61 | + $this->warn('Role not found by name '.$roleName.'!'); |
|
| 62 | 62 | } |
| 63 | 63 | } |
| 64 | 64 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | // Generate all permissions if only scope is passed |
| 43 | 43 | if (false === strpos($permissionName, '-')) { |
| 44 | 44 | $cleanPermissionNames = array_merge($cleanPermissionNames, Permission::generate($permissionName)); |
| 45 | - } else { |
|
| 45 | + }else { |
|
| 46 | 46 | // Trim the value |
| 47 | 47 | $cleanPermissionNames[] = $permissionName; |
| 48 | 48 | } |
@@ -55,6 +55,6 @@ discard block |
||
| 55 | 55 | $role->givePermissionTo($cleanPermissionName); |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - $this->info('Role ' . $role->name . ' was assigned the permissions: ' . implode(',', $cleanPermissionNames)); |
|
| 58 | + $this->info('Role '.$role->name.' was assigned the permissions: '.implode(',', $cleanPermissionNames)); |
|
| 59 | 59 | } |
| 60 | 60 | } |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | { |
| 24 | 24 | if ($this->isPreviewAllowed()) { |
| 25 | 25 | $pages = Page::all(); |
| 26 | - } else { |
|
| 26 | + }else { |
|
| 27 | 27 | $pages = Page::getAllPublished(); |
| 28 | 28 | } |
| 29 | 29 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | { |
| 35 | 35 | if ($this->isPreviewAllowed()) { |
| 36 | 36 | $page = Page::findBySlug($request->slug); |
| 37 | - } else { |
|
| 37 | + }else { |
|
| 38 | 38 | $page = Page::findPublishedBySlug($request->slug); |
| 39 | 39 | } |
| 40 | 40 | |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | { |
| 18 | 18 | $this->registerPolicies(); |
| 19 | 19 | |
| 20 | - Auth::provider('chief-eloquent', function ($app, array $config) { |
|
| 20 | + Auth::provider('chief-eloquent', function($app, array $config) { |
|
| 21 | 21 | return new ChiefUserProvider($app['hash'], $config['model']); |
| 22 | 22 | }); |
| 23 | 23 | } |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | protected function unauthorized($request, AuthorizationException $exception) |
| 62 | 62 | { |
| 63 | 63 | return redirect()->route('chief.back.dashboard') |
| 64 | - ->with('messages.error', 'Oeps. Het lijkt erop dat je geen toegang hebt tot dit deel van chief. Vraag even de beheerder voor meer info.'); |
|
| 64 | + ->with('messages.error', 'Oeps. Het lijkt erop dat je geen toegang hebt tot dit deel van chief. Vraag even de beheerder voor meer info.'); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | if ($this->option('force')) { |
| 34 | 34 | $this->call('migrate:fresh', ['--force' => true]); |
| 35 | - } else { |
|
| 35 | + }else { |
|
| 36 | 36 | $this->call('migrate:fresh'); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -48,11 +48,11 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | private function settingPermissionsAndRoles() |
| 50 | 50 | { |
| 51 | - AuthorizationDefaults::permissions()->each(function ($permissionName) { |
|
| 51 | + AuthorizationDefaults::permissions()->each(function($permissionName) { |
|
| 52 | 52 | Artisan::call('chief:permission', ['name' => $permissionName]); |
| 53 | 53 | }); |
| 54 | 54 | |
| 55 | - AuthorizationDefaults::roles()->each(function ($defaultPermissions, $roleName) { |
|
| 55 | + AuthorizationDefaults::roles()->each(function($defaultPermissions, $roleName) { |
|
| 56 | 56 | Artisan::call('chief:role', ['name' => $roleName, '--permissions' => implode(',', $defaultPermissions)]); |
| 57 | 57 | }); |
| 58 | 58 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | ['Json', 'Voorhees', '[email protected]', $password], |
| 78 | 78 | ]); |
| 79 | 79 | |
| 80 | - $admins->each(function ($admin) { |
|
| 80 | + $admins->each(function($admin) { |
|
| 81 | 81 | $this->createUser($admin[0], $admin[1], $admin[2], $admin[3], 'developer'); |
| 82 | 82 | $this->info('Added '.$admin[0].' as developer role with your provided password.'); |
| 83 | 83 | }); |