F
Filament2mo 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 Koch2mo 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
Eagle2mo ago
@Dennis Koch I don't know what you have asked me. I am very beginner to this.
Dennis Koch
Dennis Koch2mo 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
More Posts
Conditional validation on field in a repeaterHi all, I have some difficulties to run validation on fields in repeater fields... So, let me explaiTarget class [filament] does not exist. ?Why am I getting this error when I try to send a get request from PostMan? Everything is installed pHow to Access image in filament if I want to modify that .How to Access image in filament if I want to modify that like I am trying to upload image on BunnyCDCalling $wire.$id inside custom form element returns the whole form ID and not only the element.I am trying to use `$wire.$call('myFunction')` from inside a custom form component, but I get `UnablResource vs Page for Stock Management & Reporting?Hi there, I am quite new to Filament and now have to build a Stock Management & Reporting view for mIs there anyway to reload RelationManager Owner page with Spa mode?In my CreateAction of the RelationManager, I have update some ower model data, I then want it to refIssues with scrolling relationship manager modal on IOS DevicesHi everyone, Hoping someone has had this issue as well 🙂 I've followed the pre-issue report guidemultiple() select not work with afterStateUpdatedgenerate attribute values based on the selected attributes and add them into the repeaterAnimation On Action Buttonhi all , i have a question . is that possible to add animation trigger on action button ? example liEasy way to only allow registration and login via Socialite?I am looking for a way to disable login and only show a login or register button with Google/Github/