File tree 2 files changed +9
-15
lines changed
2 files changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -12,19 +12,19 @@ Livewire.on("livewireFetchedData", () => {
12
12
breakpoints : {
13
13
640 : {
14
14
slidesPerView : 3 ,
15
- slidesPerGroup : 3 ,
15
+ slidesPerGroup : 2 ,
16
16
} ,
17
17
768 : {
18
18
slidesPerView : 4 ,
19
- slidesPerGroup : 4 ,
19
+ slidesPerGroup : 3 ,
20
20
} ,
21
21
1024 : {
22
22
slidesPerView : 5 ,
23
- slidesPerGroup : 5 ,
23
+ slidesPerGroup : 4 ,
24
24
} ,
25
25
1280 : {
26
26
slidesPerView : 6 ,
27
- slidesPerGroup : 6 ,
27
+ slidesPerGroup : 5 ,
28
28
} ,
29
29
} ,
30
30
} ) ;
Original file line number Diff line number Diff line change @@ -16,16 +16,7 @@ public function mount()
16
16
public function loadTrendingMoviesAndSeries ()
17
17
{
18
18
$this -> trendingMovies = Cache:: remember (' home_header' , 360 , function () {
19
- $results = collect (
20
- array_merge (
21
- Http:: withToken (config (' services.tmdb.token' ))
22
- -> get (' https://api.themoviedb.org/3/trending/movie/day' )
23
- -> json ()[' results' ] ?? [],
24
- Http:: withToken (config (' services.tmdb.token' ))
25
- -> get (' https://api.themoviedb.org/3/trending/tv/day' )
26
- -> json ()[' results' ] ?? []
27
- )
28
- );
19
+ $results = collect (array_merge (Http:: withToken (config (' services.tmdb.token' ))-> get (' https://api.themoviedb.org/3/trending/movie/day' )-> json ()[' results' ] ?? [], Http:: withToken (config (' services.tmdb.token' ))-> get (' https://api.themoviedb.org/3/trending/tv/day' )-> json ()[' results' ] ?? []));
29
20
30
21
if ($results -> isEmpty ()) {
31
22
return [];
@@ -81,7 +72,10 @@ public function loadTrendingMoviesAndSeries()
81
72
</div >
82
73
83
74
<div class =" " >
84
- <a wire:navigate :href =" `{{ route (' movies.show' , ' ' ) } } /${slide.id}`" >
75
+ <a
76
+ wire:navigate
77
+ :href =" slide.type === 'movie' ? `{{ route (' movies.show' , ' ' ) } } /${slide.id}` :
78
+ `{{ route (' series.show' , ' ' ) } } /${slide.id}`" >
85
79
<x-primary-button class =" absolute px-16 hover:cursor-pointer" >
86
80
<div class =" flex items-center gap-2" >
87
81
<svg xmlns =" http://www.w3.org/2000/svg" viewBox =" 0 0 24 24"
You can’t perform that action at this time.
0 commit comments