/home/bordesc1/public_html/ ErrorException Trying to get property 'id' of non-object https://www.bordes.com.tr/tr/urunlerimiz Stack trace Request App User Context Debug Share Expand vendor frames 46 app/Http/Controllers/HomeController.php Illuminate\Foundation\Bootstrap\HandleExceptions :100 45 App\Http\Controllers\HomeController :100 43 vendor frames… 1 public/index.php :52 Illuminate\Foundation\Bootstrap\HandleExceptions::handleError app/Http/Controllers/HomeController.php:100 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 return $this->notFound($lang); } } public function products($lang = 'tr',$cat = null,$slug = null){ $this->init($lang); if(!$slug == null){ $category = Categories::select('*')->where('slug',$cat)->first(); $pro = Categories::select('id','title')->where('parent',$category->id)->where('slug',$slug)->first(); $products = Products::Select('*')->where('cid',$pro->id)->orderBy('sortorder','asc')->paginate(9); }else{ $category = Categories::select('*')->where('slug',$cat)->first(); $products = Products::Select('*')->where('cid',$category->id)->orderBy('sortorder','asc')->paginate(9); } if($products){ return view('frontend.products') ->with('data',$this->data) ->with('menus',$this->menus) ->with('menucats',$this->categories) ->with('products',$products) ->with('news',$this->news) ->with('logos',$this->logos) ->with('lang',$lang) ->with('slug',$slug)