@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | return $this->cache |
30 | 30 | ->tags($this->entityName, 'global') |
31 | 31 | ->remember("{$this->locale}.{$this->entityName}.findHomepage", $this->cacheTime, |
32 | - function () { |
|
32 | + function() { |
|
33 | 33 | return $this->repository->findHomepage(); |
34 | 34 | } |
35 | 35 | ); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | return $this->cache |
45 | 45 | ->tags($this->entityName, 'global') |
46 | 46 | ->remember("{$this->locale}.{$this->entityName}.countAll", $this->cacheTime, |
47 | - function () { |
|
47 | + function() { |
|
48 | 48 | return $this->repository->countAll(); |
49 | 49 | } |
50 | 50 | ); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | return $this->cache |
61 | 61 | ->tags($this->entityName, 'global') |
62 | 62 | ->remember("{$this->locale}.{$this->entityName}.findBySlugInLocale.{$slug}.{$locale}", $this->cacheTime, |
63 | - function () use ($slug, $locale) { |
|
63 | + function() use ($slug, $locale) { |
|
64 | 64 | return $this->repository->findBySlugInLocale($slug, $locale); |
65 | 65 | } |
66 | 66 | ); |
@@ -83,7 +83,7 @@ |
||
83 | 83 | public function findBySlugInLocale($slug, $locale) |
84 | 84 | { |
85 | 85 | if (method_exists($this->model, 'translations')) { |
86 | - return $this->model->whereHas('translations', function (Builder $q) use ($slug, $locale) { |
|
86 | + return $this->model->whereHas('translations', function(Builder $q) use ($slug, $locale) { |
|
87 | 87 | $q->where('slug', $slug); |
88 | 88 | $q->where('locale', $locale); |
89 | 89 | })->with('translations')->first(); |
@@ -33,12 +33,12 @@ |
||
33 | 33 | */ |
34 | 34 | public function extendWith(Menu $menu) |
35 | 35 | { |
36 | - $menu->group(trans('core::sidebar.content'), function (Group $group) { |
|
37 | - $group->item(trans('page::pages.title.pages'), function (Item $item) { |
|
36 | + $menu->group(trans('core::sidebar.content'), function(Group $group) { |
|
37 | + $group->item(trans('page::pages.title.pages'), function(Item $item) { |
|
38 | 38 | $item->icon('fa fa-file'); |
39 | 39 | $item->weight(1); |
40 | 40 | $item->route('admin.page.page.index'); |
41 | - $item->badge(function (Badge $badge, PageRepository $page) { |
|
41 | + $item->badge(function(Badge $badge, PageRepository $page) { |
|
42 | 42 | $badge->setClass('bg-green'); |
43 | 43 | $badge->setValue($page->countAll()); |
44 | 44 | }); |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | */ |
18 | 18 | protected function getFrontendRoute() |
19 | 19 | { |
20 | - return __DIR__ . '/../Http/frontendRoutes.php'; |
|
20 | + return __DIR__.'/../Http/frontendRoutes.php'; |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | /** |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | protected function getBackendRoute() |
27 | 27 | { |
28 | - return __DIR__ . '/../Http/backendRoutes.php'; |
|
28 | + return __DIR__.'/../Http/backendRoutes.php'; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
@@ -52,10 +52,10 @@ |
||
52 | 52 | { |
53 | 53 | $this->app->bind( |
54 | 54 | 'Modules\Page\Repositories\PageRepository', |
55 | - function () { |
|
55 | + function() { |
|
56 | 56 | $repository = new EloquentPageRepository(new Page()); |
57 | 57 | |
58 | - if (! Config::get('app.cache')) { |
|
58 | + if (!Config::get('app.cache')) { |
|
59 | 59 | return $repository; |
60 | 60 | } |
61 | 61 |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('page__pages', function (Blueprint $table) { |
|
15 | + Schema::create('page__pages', function(Blueprint $table) { |
|
16 | 16 | $table->engine = 'InnoDB'; |
17 | 17 | $table->increments('id'); |
18 | 18 | $table->boolean('is_home')->default(0); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $table->timestamps(); |
21 | 21 | }); |
22 | 22 | |
23 | - Schema::create('page__page_translations', function (Blueprint $table) { |
|
23 | + Schema::create('page__page_translations', function(Blueprint $table) { |
|
24 | 24 | $table->engine = 'InnoDB'; |
25 | 25 | $table->increments('id'); |
26 | 26 | $table->integer('page_id')->unsigned(); |
@@ -3,11 +3,11 @@ |
||
3 | 3 | use Illuminate\Routing\Router; |
4 | 4 | |
5 | 5 | /** @var Router $router */ |
6 | -$router->bind('page', function ($id) { |
|
6 | +$router->bind('page', function($id) { |
|
7 | 7 | return app(\Modules\Page\Repositories\PageRepository::class)->find($id); |
8 | 8 | }); |
9 | 9 | |
10 | -$router->group(['prefix' => '/page'], function (Router $router) { |
|
10 | +$router->group(['prefix' => '/page'], function(Router $router) { |
|
11 | 11 | $router->get('pages', [ |
12 | 12 | 'as' => 'admin.page.page.index', |
13 | 13 | 'uses' => 'PageController@index', |
@@ -3,7 +3,7 @@ |
||
3 | 3 | use Illuminate\Routing\Router; |
4 | 4 | |
5 | 5 | /** @var Router $router */ |
6 | -if (! App::runningInConsole()) { |
|
6 | +if (!App::runningInConsole()) { |
|
7 | 7 | $router->get('/', [ |
8 | 8 | 'uses' => 'PublicController@homepage', |
9 | 9 | 'as' => 'homepage', |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | $templates = []; |
36 | 36 | |
37 | - foreach ($this->finder->allFiles($path . '/views') as $template) { |
|
37 | + foreach ($this->finder->allFiles($path.'/views') as $template) { |
|
38 | 38 | $relativePath = $template->getRelativePath(); |
39 | 39 | |
40 | 40 | if ($this->isLayoutOrPartial($relativePath)) { |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $file = $this->removeExtensionsFromFilename($template); |
46 | 46 | |
47 | 47 | if ($this->hasSubdirectory($relativePath)) { |
48 | - $templates[str_replace('/', '.', $relativePath) . '.' . $file] = $templateName; |
|
48 | + $templates[str_replace('/', '.', $relativePath).'.'.$file] = $templateName; |
|
49 | 49 | } else { |
50 | 50 | $templates[$file] = $templateName; |
51 | 51 | } |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $relativePath = $template->getRelativePath(); |
95 | 95 | $fileName = $this->removeExtensionsFromFilename($template); |
96 | 96 | |
97 | - return $this->hasSubdirectory($relativePath) ? $relativePath . '/' . $fileName : $fileName; |
|
97 | + return $this->hasSubdirectory($relativePath) ? $relativePath.'/'.$fileName : $fileName; |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
@@ -130,6 +130,6 @@ discard block |
||
130 | 130 | */ |
131 | 131 | private function hasSubdirectory($relativePath) |
132 | 132 | { |
133 | - return ! empty($relativePath); |
|
133 | + return !empty($relativePath); |
|
134 | 134 | } |
135 | 135 | } |