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`



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

Aucun commentaire:

Enregistrer un commentaire