Merhabalar.
$envanter= ProductModel::all();
return view ('envanter.index')->with('envanter', $envanter);
$category= ProductCategoryModel::all();
return view ('envanter.index')->with('category', $category);
bir controller dosyamda böyle bir işlem var ve çalışıyor. Şimdi ben bir veri ekleme ekranında iki dropdown menüye sahibim. burada 2 tane foreach yapmam gerekiyor.
$envanter= DB::table('product_models')
->join('product_feature_models', 'product_models.id', '=', 'product_feature_models.product_id')
->select('product_models.*', 'product_feature_models.*')
->get();
return view('envanter-tanimla.index')->with('envanter', $envanter);
$kullanicilar= DB::table('user_feature_models')
->select('user_feature_models.*')
->get();
return view('envanter-tanimla.index')->with('kullanicilar', $kullanicilar);
bunu yazdığım zaman $kullanicilar ı tanımadığına dair bir hata alıyorum. Yardımcı olursanız sevinirim