jeudi 30 novembre 2017

Can't querry datas

I have the following tables:

biens(id,prix,option_id,quartier_id,typebien_id);
options(id,libelle);
typebiens(id,libelle);

I need to select all biens with the specific optionsand typebiens. here is what i do:

    public function afficherCommerce($libelle)
    {
       $bienscommerce = \App\Bien::with(['option','typebien','quartier'])
           ->where('biens','option.id','=','biens.option_id')
           ->where('options.libelle','=',$libelle)
           ->get();
}

But can't query them. Need your help!



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

Aucun commentaire:

Enregistrer un commentaire