get(); return view('item.index', compact('items')); } /** * Stores the included item into database * As the items are included on the Product view, * it must return to there after inclusion * * @return (view) The product view */ public function store() { $this->validate(request(), ['name' => 'required']); Item::create(['name' => request('item'), 'productID' => request('productID')]); //Just remember to add the fillable on Model to make this work return redirect('product'); } }