jeudi 23 février 2017

how to get pagination in laravel 5

In controller



function show($feast_id)
{
    $feastMenu = Feast::find($feast_id);
    $feastMenu->load('images', 'menu', 'users');
    $feastMenu->chef->load('chefMeta');
    $feastMenu = $feastMenu->toArray();
    return view('feasts.showFeastMenu', compact('feastMenu'));
}

in views

@foreach($feastMenu['menu'] as $k => $menu)

Menu“”( course meal)



@foreach($menu['menu_items'] as $item)


    
@endforeach

@endforeach

How can i set pagination into this pls suggest in laravel i am using laravel 5. I have used relation into the controller and pass those toArray



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

Aucun commentaire:

Enregistrer un commentaire