vendredi 7 septembre 2018

Get data against id in Laravel

Here is my Controller code to show order detail against order id. When press button to check detail order, I have successfully received id of order that comes from order page but does not receive after findL

public function detailorders($id){
   print_r($id); die;
   $this->dorders = orderdetail::find($id);

   $data = (array)$this;

   return view('template/admin/modules/orders/detailorders',compact('data'));
}

Here the code about show all details of order thats comes from order page agains order id

<tr role="row" class="odd">
  <td class="sorting_1"></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>

I am getting this error:

Trying to get property 'id' of non-object
(View: C:\xampp\htdocs\shopping_cart\resources\views\template\admin\modules\orders\detailorders.blade.php)



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2wZYO7l
via IFTTT

Aucun commentaire:

Enregistrer un commentaire