I have a var let's say $var1
I want to run it in query builder like this
DB::table('test')->join('... `many join here` ....')->where('testA', '=', '$var1')->get();
the problem is if $var = ""
or null
it's not return any data
I try to follow this link @phill answer
but confused implemented in query builder laravel
@update
when i add $get
in 3
it's not display anything
and when i check console it's error 500 (object of class can't be converted to string)
when i add $get
in 2
it's can give result when $var
not empty..but when $var
empty it's error
where i'm missing?