@@ -25,8 +25,8 @@ |
||
25 | 25 | public function rules() |
26 | 26 | { |
27 | 27 | return [ |
28 | - 'trans.*.title' => 'required|unique:page_translations,title,'. $this->id . ',page_id|max:200', |
|
29 | - 'trans.*.slug' => 'required|unique:page_translations,slug,' . $this->id . ',page_id|distinct', |
|
28 | + 'trans.*.title' => 'required|unique:page_translations,title,'.$this->id.',page_id|max:200', |
|
29 | + 'trans.*.slug' => 'required|unique:page_translations,slug,'.$this->id.',page_id|distinct', |
|
30 | 30 | 'trans.*.content' => 'required|max:1500', |
31 | 31 | 'trans.*.short' => 'max:700', |
32 | 32 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | public function index() |
13 | 13 | { |
14 | 14 | $pages = Page::sequence()->get(); |
15 | - $pages->each(function ($page) { |
|
15 | + $pages->each(function($page) { |
|
16 | 16 | $page->groupedlines = $this->groupLinesByKey($page); |
17 | 17 | }); |
18 | 18 | return view('squanto::index', compact('pages')); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | { |
49 | 49 | $page = app(CreatePage::class)->handle($request->trans); |
50 | 50 | |
51 | - return redirect()->route('chief.back.pages.index')->with('messages.success', $page->title .' is aangemaakt'); |
|
51 | + return redirect()->route('chief.back.pages.index')->with('messages.success', $page->title.' is aangemaakt'); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | { |
80 | 80 | $page = app(UpdatePage::class)->handle($id, $request->trans, $request->relations); |
81 | 81 | |
82 | - return redirect()->route('chief.back.pages.index')->with('messages.success', '<i class="fa fa-fw fa-check-circle"></i> "'.$page->title .'" werd aangepast'); |
|
82 | + return redirect()->route('chief.back.pages.index')->with('messages.success', '<i class="fa fa-fw fa-check-circle"></i> "'.$page->title.'" werd aangepast'); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
@@ -109,8 +109,8 @@ discard block |
||
109 | 109 | |
110 | 110 | public function publish(Request $request) |
111 | 111 | { |
112 | - $page = Page::findOrFail($request->get('id')); |
|
113 | - $published = true === !$request->checkboxStatus; // string comp. since bool is passed as string |
|
112 | + $page = Page::findOrFail($request->get('id')); |
|
113 | + $published = true === !$request->checkboxStatus; // string comp. since bool is passed as string |
|
114 | 114 | |
115 | 115 | ($published) ? $page->publish() : $page->draft(); |
116 | 116 |
@@ -19,11 +19,11 @@ |
||
19 | 19 | public function handle($request, Closure $next) |
20 | 20 | { |
21 | 21 | // Verifies a valid signature and still outside expiration period |
22 | - if (! $request->hasValidSignature()) { |
|
22 | + if (!$request->hasValidSignature()) { |
|
23 | 23 | return redirect()->route('invite.expired'); |
24 | 24 | } |
25 | 25 | |
26 | - if (! $invitation = Invitation::findByToken($request->token)) { |
|
26 | + if (!$invitation = Invitation::findByToken($request->token)) { |
|
27 | 27 | return redirect()->route('invite.expired'); |
28 | 28 | } |
29 | 29 |
@@ -12,12 +12,12 @@ |
||
12 | 12 | { |
13 | 13 | $optimizerChain = app(OptimizerChain::class); |
14 | 14 | |
15 | - collect($request->allFiles())->each(function ($file) use ($optimizerChain) { |
|
15 | + collect($request->allFiles())->each(function($file) use ($optimizerChain) { |
|
16 | 16 | if (is_array($file)) { |
17 | - collect($file)->each(function ($media) use ($optimizerChain) { |
|
17 | + collect($file)->each(function($media) use ($optimizerChain) { |
|
18 | 18 | $optimizerChain->optimize($media->getPathname()); |
19 | 19 | }); |
20 | - } else { |
|
20 | + }else { |
|
21 | 21 | $optimizerChain->optimize($file->getPathname()); |
22 | 22 | } |
23 | 23 | }); |
@@ -21,8 +21,8 @@ discard block |
||
21 | 21 | { |
22 | 22 | $this->registerChiefGuard(); |
23 | 23 | |
24 | - $this->app['view']->addNamespace('squanto', __DIR__ . '/../../resources/views/vendor/squanto'); |
|
25 | - $this->app['view']->addNamespace('squanto', base_path() . '/resources/views/vendor/thinktomorrow/chief/vendor/squanto'); |
|
24 | + $this->app['view']->addNamespace('squanto', __DIR__.'/../../resources/views/vendor/squanto'); |
|
25 | + $this->app['view']->addNamespace('squanto', base_path().'/resources/views/vendor/thinktomorrow/chief/vendor/squanto'); |
|
26 | 26 | |
27 | 27 | (new AuthServiceProvider($this->app))->boot(); |
28 | 28 | (new EventServiceProvider($this->app))->boot(); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $this->app->bind('command.chief:permission', GeneratePermissionCommand::class); |
60 | 60 | $this->app->bind('command.chief:role', GenerateRoleCommand::class); |
61 | 61 | $this->app->bind('command.chief:admin', CreateAdmin::class); |
62 | - $this->app->bind('command.chief:page', function ($app) { |
|
62 | + $this->app->bind('command.chief:page', function($app) { |
|
63 | 63 | return new GeneratePage($app['files'], [ |
64 | 64 | 'base_path' => base_path() |
65 | 65 | ]); |