Мне нужно преобразовать эту красноречивую модель функцию в запрос MySQL: < /p>
public function currentPrice(): HasOne
{
return $this->hasOne(Price::class)->ofMany([
'published_at' => 'max',
'id' => 'max',
], function(QueryBuilder $query) {
$query->where('published_at', '
Подробнее здесь: https://stackoverflow.com/questions/795 ... ysql-query
Мобильная версия