samedi 20 avril 2019

Cannot use object of type stdClass as array (View:

I want to use data 2 query in 1 view but Error Cannot use object of type stdClass as array (View: public function adtranspc(Request $request) { $writter = Writter::all(); $processmaster = DB::table('rocessmaster') ->where('pcm_bname', 'LIKE', "%Social%") ->get(); return view('processspj.adtranspc',[ 'writter' => $writter, 'processmaster' => $processmaster ]};

  *This is my view (this error here)
   <table id="table2" class="table table-hover table-striped">
      <tr>
         <th scope="col"></th>
         <th scope="col">Colname1</th>
      </tr>
       @foreach ($processmaster as $item)
        <tr>
          <td></td>
          <td></td>
        </tr>
       @endforeach
  </table>



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire