mardi 12 juin 2018

PAGINATION AJAX LARAVEL [HELP]

My code: This is my route: Route::get('demos/movies','HomeController@moviesReady');

In my controller i have this method:

 public function moviesReady(Request $request)
    { 
        $posts = Movie::where('m_visibility', 1)->with('generos')->get();
        return view('movieajax')->withPosts($posts);
    }

In my movieajax view file i have this:

Here my 3 scripts: The scripts

AND HERE YOU CAN SEE WORKING THE CODED VIDEO TEST

Sorry but the CTRL+K send a error so i put in screenshots.

So if you see the video is work. But i need to paginate all the movies when page load. Because in the original web i have 500 Movies and is a lost of page content so i want to paginate.

I test some: put render and in the movieajax use $post->links(); and work but the page refresh

-- SORRY IF SOMETHING IS BAD, i not perfect in english but i like to post in english to performance my lang.

If something is wrong sorry again, the CTRL+K get me some errors in the momento i post.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2JFXASK
via IFTTT

Aucun commentaire:

Enregistrer un commentaire