lundi 28 décembre 2015

Cant call column in advance where query laravel 5.0

$lists->where(function($query){
            $price = Currency::change($query->curr->name_en,Session::get('cur_name'),$query->price);
            $query->addSelect("dprice = $price");
            $query->whereBetween('dprice',[Session::get('price')['min'],Session::get('price')['max']]);
            //$query->where('price','>=',Session::get('price')['min'])->where('price','<=',Session::get('price')['max']);
        });

be know curr is relation method

Undefined property: `Illuminate\Database\Eloquent\Builder::$curr`



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire