public function delete($id) { // $item = Bahan::find($id); $item->delete(); $item['bahan'] = Bahan::all(); return redirect('bahan'); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { // $item['items'] = Bahan::all()->first(); $keranjang['bahan'] = Bahan::all(); return view('index', $keranjang); }
public function index() { $data['items'] = Bahan::all(); return view('index', $data); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { // $item['bahan'] = Bahan::all(); return view('index', $item); }