Eren
Json Show Value
Hello I have json column on my db. I want to show this section on my order details page.
What is the easiest way to show this json column in resource page ? I try to add key value but on prices another section. So. I couldnt figure it out. Please I will appriciate for an example.
Thank you
5 replies
getRouteKeyName()
public function getRouteKeyName()
{
return 'slug'; // db column name
}
I have a model and using keyname but now i have problem with filament error because slug is coming from relationship for multi language system. How can i use id , instead of slug filament resource ? I dont want to remove getroutekeyname. Its necessarry for my project.5 replies
Multiple Dynamic Path for Slug
Hi Guys , I want to bring $city->name on my slug from ID. I dont know how to achieve it. If you can help me.
Thank you. “
Thank you. “
Forms\Components\Select::make('city_id')
->relationship('cities', 'name')
->required(),
Forms\Components\TextInput::make('name')
->required()
->reactive()
->afterStateUpdated(function ($state, callable $set, callable $get){
$city = $get('city_id');
** How can i bring $city->name instead of ID here ? **
$slug = Str::slug($state);
$set('slug', $cityName . '/' . $slug);
}),
Forms\Components\TextInput::make('slug')
->disabled()
->required(), “
10 replies