Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel belongsto with condition date

Model::with(['relationMethod'=>function($query){
            return $query->where('pwra_dt', date('Y-m-d'))->get();

        }]) ->get();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #belongsto #condition #date
ADD COMMENT
Topic
Name
6+8 =