fix: caching podcasts list
This commit is contained in:
parent
ebdc50a697
commit
ae697fbaae
@ -31,7 +31,9 @@ public function index()
|
|||||||
->orderBy('episode_id', 'desc')
|
->orderBy('episode_id', 'desc')
|
||||||
->orderBy('created_at', 'desc')
|
->orderBy('created_at', 'desc')
|
||||||
->paginate($perPage = 54, $columns = ['*'], $pageName = 'artworks');
|
->paginate($perPage = 54, $columns = ['*'], $pageName = 'artworks');
|
||||||
$podcasts = Podcast::where('published', true)->with('episodes')->get();
|
$podcasts = Cache::remember('publishedPodcasts', 30, function() {
|
||||||
|
return Podcast::where('published', true)->get();
|
||||||
|
});
|
||||||
return view('explore.artworks', [
|
return view('explore.artworks', [
|
||||||
'user' => $user,
|
'user' => $user,
|
||||||
'pageTitle' => 'Explore',
|
'pageTitle' => 'Explore',
|
||||||
@ -48,7 +50,9 @@ public function index()
|
|||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
$user = auth()->user();
|
$user = auth()->user();
|
||||||
$podcasts = Podcast::where('published', true)->with('episodes')->get();
|
$podcasts = Cache::remember('publishedPodcasts', 30, function() {
|
||||||
|
return Podcast::where('published', true)->get();
|
||||||
|
});
|
||||||
return view('artworks.submit', [
|
return view('artworks.submit', [
|
||||||
'user' => $user,
|
'user' => $user,
|
||||||
'pageTitle' => 'Submit New Artwork',
|
'pageTitle' => 'Submit New Artwork',
|
||||||
@ -171,6 +175,13 @@ public function destroy(Artwork $artwork)
|
|||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function approve(Artwork $artwork)
|
||||||
|
{
|
||||||
|
$user = auth()->user();
|
||||||
|
$awatingApproval = Artwork::whereNull('approved_by')->with('podcast')->orderBy('created_at', 'asc')->get();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public function legacyArtLink(Request $request, $any = null)
|
public function legacyArtLink(Request $request, $any = null)
|
||||||
{
|
{
|
||||||
phpinfo();
|
phpinfo();
|
||||||
|
Loading…
Reference in New Issue
Block a user