Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel belongsto with condition date

public function pwra()
{
    return $this->belongsTo('AppModelsPwra', 'pwra_uuid', 'pwra_uuid')
      ->where('pwra_dt', '>=', Carbon::today())
      ->where('pwra_dt', '<', Carbon::tomorrow());
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #belongsto #condition #date
ADD COMMENT
Topic
Name
8+1 =