@@ -14,34 +14,34 @@ |
||
| 14 | 14 | // Post Index |
| 15 | 15 | public function indexPost() |
| 16 | 16 | { |
| 17 | - Cache::rememberForever('posts', function () { |
|
| 17 | + Cache::rememberForever('posts', function() { |
|
| 18 | 18 | return Post::with('author')->latest()->get(); |
| 19 | 19 | }); |
| 20 | - Cache::rememberForever('latest_limited_posts', function () { |
|
| 20 | + Cache::rememberForever('latest_limited_posts', function() { |
|
| 21 | 21 | return Post::latestLimitedPosts()->get(); |
| 22 | 22 | }); |
| 23 | - Cache::rememberForever('featured_limited_posts', function () { |
|
| 23 | + Cache::rememberForever('featured_limited_posts', function() { |
|
| 24 | 24 | return Post::featuredLimitedPosts()->get(); |
| 25 | 25 | }); |
| 26 | - Cache::rememberForever('limited_breaking_news', function () { |
|
| 26 | + Cache::rememberForever('limited_breaking_news', function() { |
|
| 27 | 27 | return Post::limitedBreakingNews()->get(); |
| 28 | 28 | }); |
| 29 | - Cache::rememberForever('limited_hot_news', function () { |
|
| 29 | + Cache::rememberForever('limited_hot_news', function() { |
|
| 30 | 30 | return Post::limitedHotNews()->get(); |
| 31 | 31 | }); |
| 32 | - Cache::rememberForever('limited_trending_posts', function () { |
|
| 32 | + Cache::rememberForever('limited_trending_posts', function() { |
|
| 33 | 33 | return Post::trending(); |
| 34 | 34 | }); |
| 35 | - Cache::rememberForever('limited_priority_posts', function () { |
|
| 35 | + Cache::rememberForever('limited_priority_posts', function() { |
|
| 36 | 36 | return Post::limitedPriorityPosts()->get(); |
| 37 | 37 | }); |
| 38 | - Cache::rememberForever('yesterday_most_visited_posts', function () { |
|
| 38 | + Cache::rememberForever('yesterday_most_visited_posts', function() { |
|
| 39 | 39 | return Post::yesterdayMostVisitedPosts()->get(); |
| 40 | 40 | }); |
| 41 | - Cache::rememberForever('week_most_visited_posts', function () { |
|
| 41 | + Cache::rememberForever('week_most_visited_posts', function() { |
|
| 42 | 42 | return Post::weekMostVisitedPosts()->get(); |
| 43 | 43 | }); |
| 44 | - Cache::rememberForever('most_visited_posts_chunked', function () { |
|
| 44 | + Cache::rememberForever('most_visited_posts_chunked', function() { |
|
| 45 | 45 | return Post::mostVisitedPostsChunked(); |
| 46 | 46 | }); |
| 47 | 47 | |
@@ -195,7 +195,7 @@ |
||
| 195 | 195 | { |
| 196 | 196 | $search = $this->search ?? null; |
| 197 | 197 | if ($search != '') { |
| 198 | - return Post::where(function ($query) use ($search) { |
|
| 198 | + return Post::where(function($query) use ($search) { |
|
| 199 | 199 | $query->where('name', 'LIKE', '%'.$search.'%') |
| 200 | 200 | ->orWhere('excerpt', 'LIKE', '%'.$search.'%') |
| 201 | 201 | ->orWhere('seo_name', 'LIKE', '%'.$search.'%') |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | { |
| 72 | 72 | $traitTemplate = file_get_contents(__DIR__.'/../../Console/Stubs/CategoryMorphedByMany.stub'); |
| 73 | 73 | |
| 74 | - if (! file_exists($path = app_path('Traits'))) { |
|
| 74 | + if (!file_exists($path = app_path('Traits'))) { |
|
| 75 | 75 | mkdir($path, 0777, true); |
| 76 | 76 | } |
| 77 | 77 | |
@@ -163,7 +163,7 @@ |
||
| 163 | 163 | */ |
| 164 | 164 | protected function registerRoutes() |
| 165 | 165 | { |
| 166 | - Route::group($this->routeConfiguration(), function () { |
|
| 166 | + Route::group($this->routeConfiguration(), function() { |
|
| 167 | 167 | $this->loadRoutesFrom(__DIR__.'/../../routes/web.php'); |
| 168 | 168 | }); |
| 169 | 169 | } |