@@ -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 | /** |
@@ -33,6 +33,6 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | protected function getApiRoute() |
| 35 | 35 | { |
| 36 | - return __DIR__ . '/../Http/apiRoutes.php'; |
|
| 36 | + return __DIR__.'/../Http/apiRoutes.php'; |
|
| 37 | 37 | } |
| 38 | 38 | } |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | {!! Form::label('tags', 'Tags:') !!} |
| 70 | 70 | <select name="tags[]" id="tags" class="input-tags" multiple> |
| 71 | 71 | <?php foreach ($post->tags()->get() as $tag): ?> |
| 72 | - <?php $tagName = $tag->hasTranslation(locale()) === true ? $tag->translate(locale())->name : 'Not translated'; ?> |
|
| 72 | + <?php $tagName = $tag->hasTranslation(locale()) === true ? $tag->translate(locale())->name : 'Not translated'; ?> |
|
| 73 | 73 | <option value="{{ $tag->id }}" selected>{{ $tagName }}</option> |
| 74 | 74 | <?php endforeach; ?> |
| 75 | 75 | </select> |
@@ -31,13 +31,13 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | public function extendWith(Menu $menu) |
| 33 | 33 | { |
| 34 | - $menu->group(trans('core::sidebar.content'), function (Group $group) { |
|
| 35 | - $group->item(trans('blog::blog.title'), function (Item $item) { |
|
| 34 | + $menu->group(trans('core::sidebar.content'), function(Group $group) { |
|
| 35 | + $group->item(trans('blog::blog.title'), function(Item $item) { |
|
| 36 | 36 | |
| 37 | 37 | $item->icon('fa fa-copy'); |
| 38 | 38 | $item->weight(0); |
| 39 | 39 | |
| 40 | - $item->item(trans('blog::post.title.post'), function (Item $item) { |
|
| 40 | + $item->item(trans('blog::post.title.post'), function(Item $item) { |
|
| 41 | 41 | $item->icon('fa fa-copy'); |
| 42 | 42 | $item->weight(0); |
| 43 | 43 | $item->append('admin.blog.post.create'); |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | $this->auth->hasAccess('blog.posts.index') |
| 47 | 47 | ); |
| 48 | 48 | }); |
| 49 | - $item->item(trans('blog::tag.title.tag'), function (Item $item) { |
|
| 49 | + $item->item(trans('blog::tag.title.tag'), function(Item $item) { |
|
| 50 | 50 | $item->icon('fa fa-tags'); |
| 51 | 51 | $item->weight(0); |
| 52 | 52 | $item->append('admin.blog.tag.create'); |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $this->auth->hasAccess('blog.tags.index') |
| 56 | 56 | ); |
| 57 | 57 | }); |
| 58 | - $item->item(trans('blog::category.title.category'), function (Item $item) { |
|
| 58 | + $item->item(trans('blog::category.title.category'), function(Item $item) { |
|
| 59 | 59 | $item->icon('fa fa-file-text'); |
| 60 | 60 | $item->weight(1); |
| 61 | 61 | $item->route('admin.blog.category.index'); |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | */ |
| 80 | 80 | public function allTranslatedIn($lang) |
| 81 | 81 | { |
| 82 | - return $this->model->whereHas('translations', function (Builder $q) use ($lang) { |
|
| 82 | + return $this->model->whereHas('translations', function(Builder $q) use ($lang) { |
|
| 83 | 83 | $q->where('locale', "$lang"); |
| 84 | 84 | $q->where('title', '!=', ''); |
| 85 | 85 | })->with('translations')->whereStatus(Status::PUBLISHED)->orderBy('created_at', 'DESC')->get(); |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | */ |
| 126 | 126 | public function findBySlug($slug) |
| 127 | 127 | { |
| 128 | - return $this->model->whereHas('translations', function (Builder $q) use ($slug) { |
|
| 128 | + return $this->model->whereHas('translations', function(Builder $q) use ($slug) { |
|
| 129 | 129 | $q->where('slug', "$slug"); |
| 130 | 130 | })->with('translations')->whereStatus(Status::PUBLISHED)->firstOrFail(); |
| 131 | 131 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function findByName($name) |
| 18 | 18 | { |
| 19 | - $tags = $this->model->with('translations')->whereHas('translations', function (Builder $q) use ($name) { |
|
| 19 | + $tags = $this->model->with('translations')->whereHas('translations', function(Builder $q) use ($name) { |
|
| 20 | 20 | $q->where('name', 'like', "%$name%"); |
| 21 | 21 | })->get(); |
| 22 | 22 | |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | return $this->cache |
| 29 | 29 | ->tags([$this->entityName, 'global']) |
| 30 | 30 | ->remember("{$this->locale}.{$this->entityName}.findByName.{$name}", $this->cacheTime, |
| 31 | - function () use ($name) { |
|
| 31 | + function() use ($name) { |
|
| 32 | 32 | return $this->repository->findByName($name); |
| 33 | 33 | } |
| 34 | 34 | ); |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | return $this->cache |
| 26 | 26 | ->tags([$this->entityName, 'global']) |
| 27 | 27 | ->remember("{$this->locale}.{$this->entityName}.latest.{$amount}", $this->cacheTime, |
| 28 | - function () use ($amount) { |
|
| 28 | + function() use ($amount) { |
|
| 29 | 29 | return $this->repository->latest($amount); |
| 30 | 30 | } |
| 31 | 31 | ); |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | return $this->cache |
| 44 | 44 | ->tags([$this->entityName, 'global']) |
| 45 | 45 | ->remember("{$this->locale}.{$this->entityName}.getPreviousOf.{$postId}", $this->cacheTime, |
| 46 | - function () use ($post) { |
|
| 46 | + function() use ($post) { |
|
| 47 | 47 | return $this->repository->getPreviousOf($post); |
| 48 | 48 | } |
| 49 | 49 | ); |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | return $this->cache |
| 62 | 62 | ->tags([$this->entityName, 'global']) |
| 63 | 63 | ->remember("{$this->locale}.{$this->entityName}.getNextOf.{$postId}", $this->cacheTime, |
| 64 | - function () use ($post) { |
|
| 64 | + function() use ($post) { |
|
| 65 | 65 | return $this->repository->getNextOf($post); |
| 66 | 66 | } |
| 67 | 67 | ); |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | public function rules() |
| 10 | 10 | { |
| 11 | 11 | return [ |
| 12 | - // 'slug[en]' => 'required' |
|
| 12 | + // 'slug[en]' => 'required' |
|
| 13 | 13 | ]; |
| 14 | 14 | } |
| 15 | 15 | |
@@ -3,18 +3,18 @@ |
||
| 3 | 3 | use Illuminate\Routing\Router; |
| 4 | 4 | |
| 5 | 5 | /** @var Router $router */ |
| 6 | -$router->bind('category', function ($id) { |
|
| 6 | +$router->bind('category', function($id) { |
|
| 7 | 7 | return app(\Modules\Blog\Repositories\CategoryRepository::class)->find($id); |
| 8 | 8 | }); |
| 9 | -$router->bind('post', function ($id) { |
|
| 9 | +$router->bind('post', function($id) { |
|
| 10 | 10 | return app(\Modules\Blog\Repositories\PostRepository::class)->find($id); |
| 11 | 11 | }); |
| 12 | 12 | |
| 13 | -$router->bind('tag', function ($id) { |
|
| 13 | +$router->bind('tag', function($id) { |
|
| 14 | 14 | return app(Modules\Blog\Repositories\TagRepository::class)->find($id); |
| 15 | 15 | }); |
| 16 | 16 | |
| 17 | -$router->group(['prefix' => '/blog'], function (Router $router) { |
|
| 17 | +$router->group(['prefix' => '/blog'], function(Router $router) { |
|
| 18 | 18 | $router->get('posts', [ |
| 19 | 19 | 'as' => 'admin.blog.post.index', |
| 20 | 20 | 'uses' => 'PostController@index', |