@@ -23,7 +23,7 @@ |
||
| 23 | 23 | |
| 24 | 24 | public function getPermissionsForIndex() |
| 25 | 25 | { |
| 26 | - $this->permissions->each(function ($permission) { |
|
| 26 | + $this->permissions->each(function($permission) { |
|
| 27 | 27 | $model = explode("_", $permission->name, 2)[1]; |
| 28 | 28 | $temp = $this->permission; |
| 29 | 29 | $temp[$model][] = explode("_", $permission->name, 2)[0]; |
@@ -56,12 +56,12 @@ |
||
| 56 | 56 | |
| 57 | 57 | public function presentForParent(ActsAsParent $parent, Relation $relation): string |
| 58 | 58 | { |
| 59 | - return 'Dit is de relatie weergave van een pagina onder ' . $parent->id; |
|
| 59 | + return 'Dit is de relatie weergave van een pagina onder '.$parent->id; |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | public function presentForChild(ActsAsChild $child, Relation $relation): string |
| 63 | 63 | { |
| 64 | - return 'Dit is de relatie weergave van een pagina als parent voor ' . $child->id; |
|
| 64 | + return 'Dit is de relatie weergave van een pagina als parent voor '.$child->id; |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | public function getRelationId(): string |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | |
| 46 | 46 | private function savePageTranslations(Page $page, $translations) |
| 47 | 47 | { |
| 48 | - $translations = collect($translations)->map(function ($trans, $locale) { |
|
| 48 | + $translations = collect($translations)->map(function($trans, $locale) { |
|
| 49 | 49 | $trans['slug'] = strip_tags($trans['slug']); |
| 50 | 50 | |
| 51 | 51 | return $trans; |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | |
| 15 | 15 | public function handle(array $translations): Page |
| 16 | 16 | { |
| 17 | - DB::transaction(function () { |
|
| 17 | + DB::transaction(function() { |
|
| 18 | 18 | }, 2); |
| 19 | 19 | |
| 20 | 20 | try { |
@@ -60,8 +60,8 @@ discard block |
||
| 60 | 60 | private function publishModel() |
| 61 | 61 | { |
| 62 | 62 | $this->publishFile( |
| 63 | - __DIR__ . '/stubs/model.php.stub', |
|
| 64 | - $to = $this->dirs['model'] . '/' . ucfirst($this->plural) . '/' . ucfirst($this->singular) . '.php', |
|
| 63 | + __DIR__.'/stubs/model.php.stub', |
|
| 64 | + $to = $this->dirs['model'].'/'.ucfirst($this->plural).'/'.ucfirst($this->singular).'.php', |
|
| 65 | 65 | 'model' |
| 66 | 66 | ); |
| 67 | 67 | } |
@@ -69,8 +69,8 @@ discard block |
||
| 69 | 69 | private function publishController() |
| 70 | 70 | { |
| 71 | 71 | $this->publishFile( |
| 72 | - __DIR__ . '/stubs/controller.php.stub', |
|
| 73 | - $to = $this->dirs['controller'] . '/' . ucfirst($this->plural) . '/' . ucfirst($this->singular) . '.php', |
|
| 72 | + __DIR__.'/stubs/controller.php.stub', |
|
| 73 | + $to = $this->dirs['controller'].'/'.ucfirst($this->plural).'/'.ucfirst($this->singular).'.php', |
|
| 74 | 74 | 'controller' |
| 75 | 75 | ); |
| 76 | 76 | } |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | protected function publishFile($from, $to, $type) |
| 126 | 126 | { |
| 127 | 127 | if ($this->filesystem->exists($to) && !$this->option('force')) { |
| 128 | - if (!$this->confirm('File [' . $to . '] already exists? Overwrite this file?')) { |
|
| 128 | + if (!$this->confirm('File ['.$to.'] already exists? Overwrite this file?')) { |
|
| 129 | 129 | return; |
| 130 | 130 | } |
| 131 | 131 | } |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | |
| 165 | 165 | $to = str_replace($this->dirs['base'], '', realpath($to)); |
| 166 | 166 | |
| 167 | - $this->line('<info>Copied ' . $type . '</info> <comment>[' . $from . ']</comment> <info>To</info> <comment>[' . $to . ']</comment>'); |
|
| 167 | + $this->line('<info>Copied '.$type.'</info> <comment>['.$from.']</comment> <info>To</info> <comment>['.$to.']</comment>'); |
|
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | protected function replacePlaceholders($content) |
@@ -183,16 +183,16 @@ discard block |
||
| 183 | 183 | private function generateImportStatements(): string |
| 184 | 184 | { |
| 185 | 185 | return collect(['Illuminate\Database\Eloquent\Model']) |
| 186 | - ->map(function ($statement) { |
|
| 187 | - return 'use ' . $statement . ";\n "; |
|
| 186 | + ->map(function($statement) { |
|
| 187 | + return 'use '.$statement.";\n "; |
|
| 188 | 188 | })->implode(''); |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | private function generateTraitStatements(): string |
| 192 | 192 | { |
| 193 | 193 | return collect($this->chosenTraits) |
| 194 | - ->map(function ($statement) { |
|
| 195 | - return 'use ' . $statement . ";\n "; |
|
| 194 | + ->map(function($statement) { |
|
| 195 | + return 'use '.$statement.";\n "; |
|
| 196 | 196 | })->implode(''); |
| 197 | 197 | } |
| 198 | 198 | |
@@ -204,6 +204,6 @@ discard block |
||
| 204 | 204 | |
| 205 | 205 | // We make an estimated guess based on the project name. At Think Tomorrow, we |
| 206 | 206 | // have a src folder which is PSR-4 namespaced by the project name itself. |
| 207 | - return ucfirst(config('thinktomorrow.chief.name', 'App')).'\\'. ucfirst($this->plural); |
|
| 207 | + return ucfirst(config('thinktomorrow.chief.name', 'App')).'\\'.ucfirst($this->plural); |
|
| 208 | 208 | } |
| 209 | 209 | } |
@@ -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 | } |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | $this->app->bind('command.chief:permission', GeneratePermissionCommand::class); |
| 53 | 53 | $this->app->bind('command.chief:role', GenerateRoleCommand::class); |
| 54 | 54 | $this->app->bind('command.chief:admin', CreateAdmin::class); |
| 55 | - $this->app->bind('command.chief:page', function ($app) { |
|
| 55 | + $this->app->bind('command.chief:page', function($app) { |
|
| 56 | 56 | return new GeneratePage($app['files'], [ |
| 57 | 57 | 'base_path' => base_path() |
| 58 | 58 | ]); |
@@ -5,7 +5,7 @@ discard block |
||
| 5 | 5 | * SPIRIT ROUTES |
| 6 | 6 | * ----------------------------------------------------------------- |
| 7 | 7 | */ |
| 8 | -Route::get('spirit/{section?}/{item?}', ['as' => 'spirit.index', 'uses' => function ($section = null, $item = null) { |
|
| 8 | +Route::get('spirit/{section?}/{item?}', ['as' => 'spirit.index', 'uses' => function($section = null, $item = null) { |
|
| 9 | 9 | if ($section && $item && view()->exists('chief::spirit.'.$section.'.'.$item)) { |
| 10 | 10 | return view('chief::spirit.'.$section.'.'.$item); |
| 11 | 11 | } |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | * ADMIN ROUTES |
| 39 | 39 | * ----------------------------------------------------------------- |
| 40 | 40 | */ |
| 41 | -Route::group(['prefix' => 'admin','middleware' => ['web', 'web-chief', 'auth:chief']], function () { |
|
| 41 | +Route::group(['prefix' => 'admin', 'middleware' => ['web', 'web-chief', 'auth:chief']], function() { |
|
| 42 | 42 | Route::get('logout', 'Thinktomorrow\Chief\App\Http\Controllers\Auth\LoginController@logout')->name('chief.back.logout'); |
| 43 | 43 | |
| 44 | 44 | Route::get('/', 'Thinktomorrow\Chief\App\Http\Controllers\Back\DashboardController@show')->name('chief.back.dashboard'); |
@@ -67,9 +67,9 @@ discard block |
||
| 67 | 67 | |
| 68 | 68 | Route::post('page/{id}/upload', 'Thinktomorrow\Chief\App\Http\Controllers\Back\PagesController@upload')->name('page.upload'); |
| 69 | 69 | |
| 70 | - Route::get('/settings', ['as' => 'chief.back.settings.index','uses' => Thinktomorrow\Chief\App\Http\Controllers\Back\System\SettingsController::class.'@show']); |
|
| 70 | + Route::get('/settings', ['as' => 'chief.back.settings.index', 'uses' => Thinktomorrow\Chief\App\Http\Controllers\Back\System\SettingsController::class.'@show']); |
|
| 71 | 71 | |
| 72 | - Route::post('notes/publish', ['as' => 'notes.publish','uses' => Thinktomorrow\Chief\App\Http\Controllers\Back\NoteController::class.'@publish']); |
|
| 72 | + Route::post('notes/publish', ['as' => 'notes.publish', 'uses' => Thinktomorrow\Chief\App\Http\Controllers\Back\NoteController::class.'@publish']); |
|
| 73 | 73 | Route::resource('notes', Thinktomorrow\Chief\App\Http\Controllers\Back\NoteController::class); |
| 74 | 74 | |
| 75 | 75 | // YOUR PROFILE MANAGEMENT |
@@ -119,14 +119,14 @@ discard block |
||
| 119 | 119 | * ----------------------------------------------------------------- |
| 120 | 120 | */ |
| 121 | 121 | // Developer access |
| 122 | - Route::get('translations/lines/create', ['middleware' => 'auth.superadmin', 'as' => 'squanto.lines.create','uses' => '\Thinktomorrow\Squanto\Manager\Http\Controllers\LineController@create']); |
|
| 123 | - Route::delete('translations/lines/{id}', ['middleware' => 'auth.superadmin', 'as' => 'squanto.lines.destroy','uses' => '\Thinktomorrow\Squanto\Manager\Http\Controllers\LineController@destroy']); |
|
| 124 | - Route::get('translations/lines/{id}/edit', ['middleware' => 'auth.superadmin', 'as' => 'squanto.lines.edit','uses' => '\Thinktomorrow\Squanto\Manager\Http\Controllers\LineController@edit']); |
|
| 125 | - Route::put('translations/lines/{id}', ['middleware' => 'auth.superadmin', 'as' => 'squanto.lines.update','uses' => '\Thinktomorrow\Squanto\Manager\Http\Controllers\LineController@update']); |
|
| 126 | - Route::post('translations/lines', ['middleware' => 'auth.superadmin', 'as' => 'squanto.lines.store','uses' => '\Thinktomorrow\Squanto\Manager\Http\Controllers\LineController@store']); |
|
| 122 | + Route::get('translations/lines/create', ['middleware' => 'auth.superadmin', 'as' => 'squanto.lines.create', 'uses' => '\Thinktomorrow\Squanto\Manager\Http\Controllers\LineController@create']); |
|
| 123 | + Route::delete('translations/lines/{id}', ['middleware' => 'auth.superadmin', 'as' => 'squanto.lines.destroy', 'uses' => '\Thinktomorrow\Squanto\Manager\Http\Controllers\LineController@destroy']); |
|
| 124 | + Route::get('translations/lines/{id}/edit', ['middleware' => 'auth.superadmin', 'as' => 'squanto.lines.edit', 'uses' => '\Thinktomorrow\Squanto\Manager\Http\Controllers\LineController@edit']); |
|
| 125 | + Route::put('translations/lines/{id}', ['middleware' => 'auth.superadmin', 'as' => 'squanto.lines.update', 'uses' => '\Thinktomorrow\Squanto\Manager\Http\Controllers\LineController@update']); |
|
| 126 | + Route::post('translations/lines', ['middleware' => 'auth.superadmin', 'as' => 'squanto.lines.store', 'uses' => '\Thinktomorrow\Squanto\Manager\Http\Controllers\LineController@store']); |
|
| 127 | 127 | |
| 128 | 128 | // Client access |
| 129 | - Route::get('translations/{id}/edit', ['as' => 'squanto.edit','uses' => '\Thinktomorrow\Squanto\Manager\Http\Controllers\TranslationController@edit']); |
|
| 130 | - Route::put('translations/{id}', ['as' => 'squanto.update','uses' => '\Thinktomorrow\Squanto\Manager\Http\Controllers\TranslationController@update']); |
|
| 131 | - Route::get('translations', ['as' => 'squanto.index','uses' => 'Thinktomorrow\Chief\App\Http\Controllers\Back\TranslationController@index']); |
|
| 129 | + Route::get('translations/{id}/edit', ['as' => 'squanto.edit', 'uses' => '\Thinktomorrow\Squanto\Manager\Http\Controllers\TranslationController@edit']); |
|
| 130 | + Route::put('translations/{id}', ['as' => 'squanto.update', 'uses' => '\Thinktomorrow\Squanto\Manager\Http\Controllers\TranslationController@update']); |
|
| 131 | + Route::get('translations', ['as' => 'squanto.index', 'uses' => 'Thinktomorrow\Chief\App\Http\Controllers\Back\TranslationController@index']); |
|
| 132 | 132 | }); |