Fabien K.
Fabien K.
FFilament
Created by Fabien K. on 10/6/2023 in #❓┊help
getTableRecordUrlUsing - in RelationManager wrong argument.
I was using 3.0.39 After updating to 3.0.69 callback injects $record as Table instead of model My code (in a RelationManager)
protected function getTableRecordUrlUsing(): ?Closure
{
return function (Model $record): string {
return ShopCategoryResource::getUrl('edit', ['record' => $record]);
};
}
protected function getTableRecordUrlUsing(): ?Closure
{
return function (Model $record): string {
return ShopCategoryResource::getUrl('edit', ['record' => $record]);
};
}
I don't know if it's intended or not but it does no longer reflect the doc at https://filamentphp.com/docs/2.x/tables/getting-started#record-urls
5 replies
FFilament
Created by Fabien K. on 9/6/2023 in #❓┊help
Select::createOptionUsing not updating selected element in v3
I can't make it work. I'm using v3.0.39
Here is an dummy example
Select::make('test')
->options(function(){
return Tag::pluck('name','id');
})
->createOptionForm([TextInput::make('name')])
->createOptionUsing(function($data){
$tag = new Tag();
$tag->fill($data);
$tag->save();
return $tag->getKey();
})
Select::make('test')
->options(function(){
return Tag::pluck('name','id');
})
->createOptionForm([TextInput::make('name')])
->createOptionUsing(function($data){
$tag = new Tag();
$tag->fill($data);
$tag->save();
return $tag->getKey();
})
The record is created but the select doesn't reflect the change. Thanks in advance
37 replies