Сейчас мой результат:
Код: Выделить всё
return $this->hasManyThrough('App\Facility', 'App\MerchantBranchFacility', 'id,'facility_id')->select('name');
{"facilities":[{"name":"AC","id":"13"},{"name":"Wi-Fi","id":"13"}}}
Код: Выделить всё
return array_merge($columns, [$this->parent->getTable().'.'.$this->firstKey]);
Подробнее здесь: https://stackoverflow.com/questions/333 ... t-firstkey
Мобильная версия