vendredi 24 mai 2019

Trying to get property 'name' of non-object ? when i using pluck()

     Trying to get property 'name' of non-object? when i using pluck() for retrive data from database

//a.contoller       
     public function index(){
      $insurance = Insurance_Providers::pluck('id','name');
      $physicians = Physicians::pluck('id','pp','sp');
      $pharmacies = Pharmacies::pluck('id','name');
      return view('auth.profile',compact('insurance','physicians','pharmacies'));
    }

//a.blade.php
    <select name="insurance" id="ip" class="form-control" required>
    <option value="">Insurance Provider</option>
     @foreach($insurance as $pro)   <option value=""></option>
     @endforeach
     </select>

Trying to get property 'name' of non-object? when i using pluck() for retrive data from database



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire