Create Pagenation in Laravel

 <p>How can add pagination in Larave in view blade</p> 

Answer
 
pubic function function_name() {
   $varible = DB::table(‘table_name’)->paginate(number_of_records_in_one_page);
   return view('example_view',['varible'=>$varible])
}

 

pubic function function_name() {

   $varible = DB::table(‘table_name’)->paginate(number_of_records_in_one_page);

   return view('example_view',['varible'=>$varible])

}


 

In controller:
public function funciton_name()

{

$variable = DB::table('table_name')->paginate(number_of_records);

}

In blade:

{{$variable->links()}}