fixed sanitazer and academy
This commit is contained in:
@@ -65,6 +65,7 @@ final class DiscoverController extends Controller
|
||||
return view('web.discover.index', [
|
||||
'artworks' => $results,
|
||||
'page_title' => 'Trending Artworks',
|
||||
'page_canonical' => $this->canonicalRoute('discover.trending'),
|
||||
'section' => 'trending',
|
||||
'description' => 'The most-viewed artworks on Skinbase over the past 7 days.',
|
||||
'icon' => 'fa-fire',
|
||||
@@ -97,6 +98,7 @@ final class DiscoverController extends Controller
|
||||
return view('web.discover.index', [
|
||||
'artworks' => $results,
|
||||
'page_title' => 'Rising Now',
|
||||
'page_canonical' => $this->canonicalRoute('discover.rising'),
|
||||
'section' => 'rising',
|
||||
'description' => 'Fastest growing artworks right now.',
|
||||
'icon' => 'fa-rocket',
|
||||
@@ -119,6 +121,7 @@ final class DiscoverController extends Controller
|
||||
return view('web.discover.index', [
|
||||
'artworks' => $results,
|
||||
'page_title' => 'Fresh Uploads',
|
||||
'page_canonical' => $this->canonicalRoute('discover.fresh'),
|
||||
'section' => 'fresh',
|
||||
'description' => 'The latest artworks just uploaded to Skinbase.',
|
||||
'icon' => 'fa-bolt',
|
||||
@@ -138,6 +141,7 @@ final class DiscoverController extends Controller
|
||||
return view('web.discover.index', [
|
||||
'artworks' => $results,
|
||||
'page_title' => 'Top Rated Artworks',
|
||||
'page_canonical' => $this->canonicalRoute('discover.top-rated'),
|
||||
'section' => 'top-rated',
|
||||
'description' => 'The most-loved artworks on Skinbase, ranked by community favourites.',
|
||||
'icon' => 'fa-medal',
|
||||
@@ -157,6 +161,7 @@ final class DiscoverController extends Controller
|
||||
return view('web.discover.index', [
|
||||
'artworks' => $results,
|
||||
'page_title' => 'Most Downloaded',
|
||||
'page_canonical' => $this->canonicalRoute('discover.most-downloaded'),
|
||||
'section' => 'most-downloaded',
|
||||
'description' => 'All-time most downloaded artworks on Skinbase.',
|
||||
'icon' => 'fa-download',
|
||||
@@ -178,9 +183,9 @@ final class DiscoverController extends Controller
|
||||
'categories:id,name,slug,content_type_id,parent_id,sort_order',
|
||||
'categories.contentType:id,slug,name',
|
||||
])
|
||||
->whereRaw('MONTH(published_at) = ?', [$today->month])
|
||||
->whereRaw('DAY(published_at) = ?', [$today->day])
|
||||
->whereRaw('YEAR(published_at) < ?', [$today->year])
|
||||
->whereMonth('published_at', $today->month)
|
||||
->whereDay('published_at', $today->day)
|
||||
->whereYear('published_at', '<', $today->year)
|
||||
->orderMissingThumbnailsLast()
|
||||
->orderByDesc('published_at')
|
||||
->paginate($perPage)
|
||||
@@ -191,6 +196,7 @@ final class DiscoverController extends Controller
|
||||
return view('web.discover.index', [
|
||||
'artworks' => $artworks,
|
||||
'page_title' => 'On This Day',
|
||||
'page_canonical' => $this->canonicalRoute('discover.on-this-day'),
|
||||
'section' => 'on-this-day',
|
||||
'description' => 'Artworks published on ' . $today->format('F j') . ' in previous years.',
|
||||
'icon' => 'fa-calendar-day',
|
||||
@@ -246,6 +252,7 @@ final class DiscoverController extends Controller
|
||||
return view('web.creators.rising', [
|
||||
'creators' => $creators,
|
||||
'page_title' => 'Rising Creators — Skinbase',
|
||||
'page_canonical' => $this->canonicalRoute('creators.rising'),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -327,6 +334,7 @@ final class DiscoverController extends Controller
|
||||
return view('web.discover.index', [
|
||||
'artworks' => collect(),
|
||||
'page_title' => 'Following Feed',
|
||||
'page_canonical' => $this->canonicalRoute('discover.following'),
|
||||
'section' => 'following',
|
||||
'description' => 'Follow some creators to see their work here.',
|
||||
'icon' => 'fa-user-group',
|
||||
@@ -366,6 +374,7 @@ final class DiscoverController extends Controller
|
||||
return view('web.discover.index', [
|
||||
'artworks' => $artworks,
|
||||
'page_title' => 'Following Feed',
|
||||
'page_canonical' => $this->canonicalRoute('discover.following'),
|
||||
'section' => 'following',
|
||||
'description' => 'The latest artworks from creators you follow.',
|
||||
'icon' => 'fa-user-group',
|
||||
@@ -388,6 +397,11 @@ final class DiscoverController extends Controller
|
||||
return ! $items || $items->isEmpty();
|
||||
}
|
||||
|
||||
private function canonicalRoute(string $routeName): string
|
||||
{
|
||||
return route($routeName);
|
||||
}
|
||||
|
||||
private function paginatorHasNoRisingMomentum($paginator): bool
|
||||
{
|
||||
if (! is_object($paginator) || ! method_exists($paginator, 'getCollection')) {
|
||||
|
||||
Reference in New Issue
Block a user