Closed jay2success closed 2 years ago
Hi @jay2success thank you for reporting... tagging @nicollassilva
Hi @jay2success , this issue has been fixed for the next version of the plugin coming out soon. Thank you.
Added to latest version
Awesome, thanks for the support.
Hi,
Thanks for amazing plugin.
I found issue when testing this plugin.
Example there are User and BlogPost models.
User has many BlogPost. BlogPost: user_id belongsTo User, with relationship name: user()
The problem is if i use different foreign key and relationship name, example: BlogPost: author_id belongsTo User, with relationship name: author()
When building the BlogPostResource for filament:
on form fn()
BelongToSelect()->relationship('user', 'name')
should be:BelongToSelect()->relationship('author', 'name')
on table fn()
Tables\Columns\TextColumn::make('user.name')->limit(50),
should be:Tables\Columns\TextColumn::make('author.name')->limit(50),
and
MultiSelectFilter::make('author_id')->relationship( 'user', 'name' ),
should beMultiSelectFilter::make('author_id')->relationship( 'author', 'name' ),
Thanks.