PK

ADDRLIN : /home/questend/public_html/domains/evami.in/app/Http/ViewComposers/
FLL :
Current File : /home/questend/public_html/domains/evami.in/app/Http/ViewComposers/CategoryComposer.php

<?php

namespace App\Http\ViewComposers;

use Illuminate\View\View;
use App\Category;
class CategoryComposer
{
    protected $categoryList = [];
    protected $categoryParentList = [];
    /**
     * Create a movie composer.
     *
     * @return void
     */
    public function __construct()
    {   try{
        $this->categoryList = Category::all()->sortByDesc('sortby');       
        $this->categoryParentList = Category::all()->where('parent_id',0);
        //$this->categoryList = Category::all()->sortByDesc('sortby')->toArray();
        //$this->categoryParentList = Category::select('id','name','image','isactive','created_at')->get();
        }catch(\Exception $e){
            return view('errors.500');
            //p($e->getMessage()); exit;
        }
    }

    /**
     * Bind data to the view.
     *
     * @param  View  $view
     * @return void
     */
    public function compose(View $view)
    {   $categoryList = $this->categoryList;       
        $categoryParentList = $this->categoryParentList;
        $view->with(compact('categoryList','categoryParentList'));
    }
}


PK 99
E-SHOP || DASHBOARD
404

Page Not Found

It looks like you found a glitch in the matrix...

← Back to Home