simple paginate

Submitted by PunnaRao - 4 years ago

simple paginate using table from database and displaying in blade

Route::resource('pagination', 'PaginationController');
public function index()//sinpet in controller
        $users = DB::table('signup_table')->Paginate(1); //here 1 stands for number of records to display in page

        return view('user.index', ['users' => $users]);// sendig $users to blade

{!! $users->render() !!}//here render method can display the pagination
<div class="container">
    @foreach ($users as $user)
        Email::{{ $user->email }}
        User Name::{{ $user->full_name }}