mercredi 30 décembre 2015

Laravel returns htmlentities() expects parameter 1 to be string, object given

I have the following Laravel 5.1 controller function

public function editare($prod_id) {

    $categorii=DB::table('categorii_produse')
        ->select('cat_id')
        ->get();

    $categorie_selectata=DB::table('produse')
        ->leftjoin('categorii_produse','prod_cat_id','=','cat_id')
        ->where('prod_id','=',$prod_id)
        ->select('prod_cat_id')
        ->get();

    $articole=DB::table('produse')
        ->leftjoin('imagini','prod_id','=','img_prod_id')
        ->where('prod_id','=',$prod_id)
        ->get();


    return view ('pagini.editare',compact('categorii','categorie_selectata','articole'));

And the following line in the view which has problems

{!! Form::select('categorii',$categorii, null, ['class' => 'form-control']) !!}

The view returns the following error

htmlentities() expects parameter 1 to be string, object given



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1IEu79R
via IFTTT

Aucun commentaire:

Enregistrer un commentaire