Hello
i want change Pagination Number mode to Load more button. Please Help me change this
This is my Controller.php
public function index()
{
//$Topmusics = Post::orderBy('download_count', 'DESC')->paginate(13);
$FeaturedMusics = Post::orderBy('id','desc')->paginate(30);
return view('Pages.Music.index',compact('FeaturedMusics'));
}
/**
* Display the specified resource.
*
* @param int $slug
* @return \Illuminate\Http\Response
*/
public function show($slug)
{
// This query to get Music page //
$Music = Post::where('slug', '=', $slug)->firstOrFail();
//To Get All Music recents OUT SIDE IN HOME VIEW
// $TrendMusics = Post::latest()->paginate(6);//update by sandun
$ArtistSong = Post::where('slug', '=', $slug)->firstOrFail();
$audio_data = Audio::where('id', '=', $ArtistSong->seo_title)->firstOrFail();
$artist_data = Artist::where('id', '=', $audio_data->artist_id)->firstOrFail();
$MusicList = Post::where('Title_en', 'like', '%'.$artist_data->name.'%')->latest()->paginate(6);
$FeaturedMusics = Post::orderBy('id','desc')->paginate(30);
if(count($MusicList) < 2){
$TrendMusics = Post::orderBy('download_count', 'desc')->paginate(6);
}else{
$TrendMusics = Post::where('Title_en', 'like', '%'.$artist_data->name.'%')->latest()->paginate(12); // new update from artist
}
// dd(count($TrendMusics));
//To Get Comments
$Comments = $Music->Comments;
// To Get Change The Language
return view('Pages.Music.show',compact('Music','TrendMusics','Comments'));
Blade.php
{{ $FeaturedMusics->links() }}