Laravel Pagination Example Tutorial

Frst command on Colltroller 


public function index() { $user = DB::table('user')->paginate(15); return view('user.index', ['user' => $user]); }


Than Blade File Of View Given 


<div class="container">
    @foreach ($user as $user)
        {{ $user->name }}
    @endforeach
</div>

{{ $users->links() }}

No comments

Note: only a member of this blog may post a comment.