orlyapps / nova-belongsto-depend

Larave Nova BelongsTo Field with Dependcy
MIT License
182 stars 65 forks source link

CONCAT not working on select #36

Open lvdhoorn opened 5 years ago

lvdhoorn commented 5 years ago

When you using a CONCAT option the value from the concat is not showed inside the select.

For example:


NovaBelongsToDepend::make('Company')->options(Company::all()),
NovaBelongsToDepend::make('Debtor')->optionsResolve(function ($company) {
     return $company->debtors()->select('id',DB::raw("CONCAT(company_name,debtor_code) AS display_name"))->get('id','display_name');
})->dependsOn('Company'),`