【发布时间】:2016-04-06 14:11:15
【问题描述】:
不用写了:
{{$x = $data->where('colour_id', 1)->where('size_id', 1)->where('product_id', 1)->first() ? $data->where('colour_id', 1)->where('size_id', 1)->where('product_id', 1)->first()->quantity : 0}}
有没有更清洁的方法?
【问题讨论】:
标签: php laravel object laravel-5 blade