public function index($id){
$categories = Category::all();
$buy = Product::where('id', $id)->first();
Cart::add(array('id'=>$id,'name'=>$buy->name,'qty'=>1,'price'=>$buy->price));
return view('frontend.index',compact('categories','buy'));
}
this is my code and i cant fix this error: Missing argument 1 for App\Http\Controllers\HomeController::index(). anyone help me??? thanks
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2t02GnZ
via IFTTT
Aucun commentaire:
Enregistrer un commentaire