| @@ -27,7 +27,7 @@ | ||
| 27 | 27 | } | 
| 28 | 28 | |
| 29 | 29 | /** | 
| 30 | - * @return string | |
| 30 | + * @return boolean | |
| 31 | 31 | */ | 
| 32 | 32 | protected function getApiRoute() | 
| 33 | 33 |      { | 
| @@ -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 | /** | 
| @@ -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 | }); | 
| @@ -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', | 
| @@ -52,16 +52,16 @@ | ||
| 52 | 52 | |
| 53 | 53 | private function registerBindings() | 
| 54 | 54 |      { | 
| 55 | -        $this->app->bind(FinderService::class, function () { | |
| 55 | +        $this->app->bind(FinderService::class, function() { | |
| 56 | 56 | return new FinderService(); | 
| 57 | 57 | }); | 
| 58 | 58 | |
| 59 | 59 | $this->app->bind( | 
| 60 | 60 | 'Modules\Page\Repositories\PageRepository', | 
| 61 | -            function () { | |
| 61 | +            function() { | |
| 62 | 62 | $repository = new EloquentPageRepository(new Page()); | 
| 63 | 63 | |
| 64 | -                if (! Config::get('app.cache')) { | |
| 64 | +                if (!Config::get('app.cache')) { | |
| 65 | 65 | return $repository; | 
| 66 | 66 | } | 
| 67 | 67 | |
| @@ -35,6 +35,6 @@ | ||
| 35 | 35 | */ | 
| 36 | 36 | public function allFiles($directory, $hidden = false) | 
| 37 | 37 |      { | 
| 38 | - return iterator_to_array($this->filesystem->ignoreDotFiles(! $hidden)->in($directory), false); | |
| 38 | + return iterator_to_array($this->filesystem->ignoreDotFiles(!$hidden)->in($directory), false); | |
| 39 | 39 | } | 
| 40 | 40 | } |