Beispiel #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     //
     $poitem = Poitem::findOrFail($id);
     $headId = $poitem->pohead_id;
     Poitem::destroy($id);
     return redirect('purchase/purchaseorders/' . $headId . '/detail');
 }
 public function detail($id)
 {
     $poitems = Poitem::latest('created_at')->where('pohead_id', $id)->paginate(10);
     return view('purchase.poitems.index', compact('poitems', 'id'));
 }