@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | use Illuminate\Routing\Router; |
4 | 4 | |
5 | 5 | /** @var Router $router */ |
6 | -$router->group(['prefix' => 'v1', 'middleware' => 'api.token'], function (Router $router) { |
|
6 | +$router->group(['prefix' => 'v1', 'middleware' => 'api.token'], function(Router $router) { |
|
7 | 7 | $router->post('tag', [ |
8 | 8 | 'as' => 'api.tag.store', |
9 | 9 | 'uses' => 'TagController@store', |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | ]); |
15 | 15 | }); |
16 | 16 | |
17 | -$router->group(['prefix' => 'v1/blog', 'middleware' => 'api.token'], function (Router $router) { |
|
17 | +$router->group(['prefix' => 'v1/blog', 'middleware' => 'api.token'], function(Router $router) { |
|
18 | 18 | $router->get('categories', [ |
19 | 19 | 'as' => 'api.blog.category.index', |
20 | 20 | 'uses' => 'V1\CategoryController@index', |
@@ -30,7 +30,7 @@ |
||
30 | 30 | ->remember( |
31 | 31 | "{$this->locale}.{$this->entityName}.findByName.{$name}", |
32 | 32 | $this->cacheTime, |
33 | - function () use ($name) { |
|
33 | + function() use ($name) { |
|
34 | 34 | return $this->repository->findByName($name); |
35 | 35 | } |
36 | 36 | ); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | ->remember( |
28 | 28 | "{$this->locale}.{$this->entityName}.latest.{$amount}", |
29 | 29 | $this->cacheTime, |
30 | - function () use ($amount) { |
|
30 | + function() use ($amount) { |
|
31 | 31 | return $this->repository->latest($amount); |
32 | 32 | } |
33 | 33 | ); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | ->remember( |
48 | 48 | "{$this->locale}.{$this->entityName}.getPreviousOf.{$postId}", |
49 | 49 | $this->cacheTime, |
50 | - function () use ($post) { |
|
50 | + function() use ($post) { |
|
51 | 51 | return $this->repository->getPreviousOf($post); |
52 | 52 | } |
53 | 53 | ); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | ->remember( |
68 | 68 | "{$this->locale}.{$this->entityName}.getNextOf.{$postId}", |
69 | 69 | $this->cacheTime, |
70 | - function () use ($post) { |
|
70 | + function() use ($post) { |
|
71 | 71 | return $this->repository->getNextOf($post); |
72 | 72 | } |
73 | 73 | ); |
@@ -45,9 +45,9 @@ |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
48 | - * Get the widget type |
|
49 | - * @return string |
|
50 | - */ |
|
48 | + * Get the widget type |
|
49 | + * @return string |
|
50 | + */ |
|
51 | 51 | protected function options() |
52 | 52 | { |
53 | 53 | return [ |
@@ -50,13 +50,13 @@ discard block |
||
50 | 50 | public function boot() |
51 | 51 | { |
52 | 52 | $this->publishes([ |
53 | - __DIR__ . '/../Resources/views' => base_path('resources/views/asgard/blog'), |
|
53 | + __DIR__.'/../Resources/views' => base_path('resources/views/asgard/blog'), |
|
54 | 54 | ]); |
55 | 55 | |
56 | 56 | $this->publishConfig('blog', 'config'); |
57 | 57 | $this->publishConfig('blog', 'permissions'); |
58 | 58 | $this->publishConfig('blog', 'settings'); |
59 | - $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); |
|
59 | + $this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); |
|
60 | 60 | |
61 | 61 | $this->registerThumbnails(); |
62 | 62 | $this->app[TagManager::class]->registerNamespace(new Post()); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | private function registerBindings() |
77 | 77 | { |
78 | - $this->app->bind(PostRepository::class, function () { |
|
78 | + $this->app->bind(PostRepository::class, function() { |
|
79 | 79 | $repository = new EloquentPostRepository(new Post()); |
80 | 80 | |
81 | 81 | if (config('app.cache') === false) { |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | return new CachePostDecorator($repository); |
86 | 86 | }); |
87 | 87 | |
88 | - $this->app->bind(CategoryRepository::class, function () { |
|
88 | + $this->app->bind(CategoryRepository::class, function() { |
|
89 | 89 | $repository = new EloquentCategoryRepository(new Category()); |
90 | 90 | |
91 | 91 | if (config('app.cache') === false) { |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | 'fit' => [ |
103 | 103 | 'width' => '150', |
104 | 104 | 'height' => '150', |
105 | - 'callback' => function ($constraint) { |
|
105 | + 'callback' => function($constraint) { |
|
106 | 106 | $constraint->upsize(); |
107 | 107 | }, |
108 | 108 | ], |
@@ -15,12 +15,12 @@ discard block |
||
15 | 15 | */ |
16 | 16 | public function extendWith(\Maatwebsite\Sidebar\Menu $menu) |
17 | 17 | { |
18 | - $menu->group(trans('core::sidebar.content'), function (Group $group) { |
|
19 | - $group->item(trans('blog::blog.title'), function (Item $item) { |
|
18 | + $menu->group(trans('core::sidebar.content'), function(Group $group) { |
|
19 | + $group->item(trans('blog::blog.title'), function(Item $item) { |
|
20 | 20 | $item->icon('fa fa-copy'); |
21 | 21 | $item->weight(15); |
22 | 22 | |
23 | - $item->item(trans('blog::post.title.post'), function (Item $item) { |
|
23 | + $item->item(trans('blog::post.title.post'), function(Item $item) { |
|
24 | 24 | $item->icon('fa fa-copy'); |
25 | 25 | $item->weight(0); |
26 | 26 | $item->append('admin.blog.post.create'); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $this->auth->hasAccess('blog.posts.index') |
30 | 30 | ); |
31 | 31 | }); |
32 | - $item->item(trans('blog::category.title.category'), function (Item $item) { |
|
32 | + $item->item(trans('blog::category.title.category'), function(Item $item) { |
|
33 | 33 | $item->icon('fa fa-file-text'); |
34 | 34 | $item->weight(1); |
35 | 35 | $item->route('admin.blog.category.index'); |