Open flatcapco opened 3 years ago
Hey I have a Room model and resource. It has a column value of "name"
The way I'm calling the code actually doesnt use the "name" column but the "title()" set on the room resource:
public function title(): string { return $this->model()->property->name . ': ' . $this->model()->name; }
This code below was working fine for me until I updated:
BelongsToManyField::make('Rooms', 'rooms', Room::class),
However on the latest update I now have to do the following:
BelongsToManyField::make('Rooms', 'rooms', Room::class)->optionsLabel('name'),
Weirdly its still using the title() method to display the label.. (which is good for me) but without the options label it just spits an error out (its trying to assign the string (label) rather than id on save).
I'm using 1.9 .. previously was 1.8 I believe
Hey I have a Room model and resource. It has a column value of "name"
The way I'm calling the code actually doesnt use the "name" column but the "title()" set on the room resource:
This code below was working fine for me until I updated:
BelongsToManyField::make('Rooms', 'rooms', Room::class),
However on the latest update I now have to do the following:
BelongsToManyField::make('Rooms', 'rooms', Room::class)->optionsLabel('name'),
Weirdly its still using the title() method to display the label.. (which is good for me) but without the options label it just spits an error out (its trying to assign the string (label) rather than id on save).
I'm using 1.9 .. previously was 1.8 I believe