F
Filament8mo ago
Eagle

how to create two filament resource that corresponds to one model?

I have this table named taxonomies with following fields.
$table->id();
$table->string('name');
$table->string('type_of');
$table->id();
$table->string('name');
$table->string('type_of');
I have already a filament resource named TaxonomyResource in which the input field for type_of looks like following.
Forms\Components\Select::make('type_of')
->label('Type')
->required()
->options([
'category' => 'Category',
'tag' => 'Tag',
]),
Forms\Components\Select::make('type_of')
->label('Type')
->required()
->options([
'category' => 'Category',
'tag' => 'Tag',
]),
Now, I want to create a feature for creating those type_of values. I don't want make a different table for types. I am asked to use the same model and create a new resource for creating the types. I have not found any solution. So, what should I do? How should I proceed?
3 Replies
Dennis Koch
Dennis Koch8mo ago
So, what should I do?
I guess that's a question for the people asking you to do this. Sure you can have a separate Resource/List/View/Edit, but what's the condition that separates those?
Eagle
EagleOP8mo ago
@Dennis Koch I don't know what you have asked me. I am very beginner to this.
Dennis Koch
Dennis Koch8mo ago
I am asked to use the same model and create a new resource for creating the types.
Who came up with that request? You should ask them how they what to manage that data
Want results from more Discord servers?
Add your server