mardi 18 juillet 2017

How to present categories on 2 pages

I Need some help to presnet all the categories in 2 pages. Right now I display them in 1 pages. my quetsion is how can I display them in other page also? this is the controller:

class ShopController extends MainController
{
    public function categories(){       
        self::$data['categories']=Categorie::all()->toArray();
        self::$data['title']=self::$data['title'].'| Shop Categories';
        return view('content.categories', self::$data);   
    }

if im trying to use extends and yield it from the page 'content.categories' it says that $categories is undefined. (so it works only from content.categories)



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

Aucun commentaire:

Enregistrer un commentaire