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!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire