@@ -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 |
@@ -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', |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('blog__tags', function (Blueprint $table) { |
|
15 | + Schema::create('blog__tags', function(Blueprint $table) { |
|
16 | 16 | $table->engine = 'InnoDB'; |
17 | 17 | $table->increments('id'); |
18 | 18 | $table->timestamps(); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('blog__categories', function (Blueprint $table) { |
|
15 | + Schema::create('blog__categories', function(Blueprint $table) { |
|
16 | 16 | $table->engine = 'InnoDB'; |
17 | 17 | $table->increments('id'); |
18 | 18 | $table->timestamps(); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('blog__post_tag', function (Blueprint $table) { |
|
15 | + Schema::create('blog__post_tag', function(Blueprint $table) { |
|
16 | 16 | $table->engine = 'InnoDB'; |
17 | 17 | $table->integer('tag_id'); |
18 | 18 | $table->integer('post_id'); |