zemo
What is the best way to conditionally hide a tab in the ListResource page?
I have a resource called SubjectResource, where I have a number of tabs and each of it modifies the query in a certain way. Based on the user role, I need to hide most of the tabs.
How do I accomplish that? I have installed the plugin "Shield" to handle roles.
Thank you!
17 replies
if I use createOptionUsing (along with createOptionForm), do I have to validate the inputs manually?
in my createOptionForm I cannot seem to use Filament validation rules for the inputs. Is it because I'm using createOptionUsing?
do I have to call the Illuminate\Support\Facades\Validator and validate manually?
32 replies
How to Get $get an input that is in the main form from the ->createOptionForm modal
Context: I have a form to create a payment where you select a subscription year. Then you have to select an existent subscription (based on the subscription year).
If there is no subscription, you can create one in the modal (I've used the ->createOptionForm method to achieve this).
For a subscription to be created, you have to select a subscription year. Because you've already selected it in the process of creating the payment, I would like to Get $get it automatically.
How do I achieve this? How do I access the subscription_year selected in the main form?
There are basically two inputs with the same name. subscription_year_id in the main form, and subscription_year_id in the ->createOptionForm modal.
Thanks!
16 replies
$get('../../parent_field_name') is used to get a field outside the repeater, but what's the inverse?
in case I want to access a field inside the repeater, from outside the repeater.
I tried something like this $get('relationship_name/item1/field_name') but it doesn't work
Thanks
11 replies
Is there a way to get the selected label instead of the selected value?
I have a select that displays a list of cities, which will store the city_id.
In another input, I need to get the city name, not its id. The Get $get utility will retrieve the value, not the label. Is there accomplish this, aside from doing an additional query?
8 replies
How do I customize the redirect after login?
I've followed this tutorial but to no avail: https://laraveldaily.com/post/filament-disable-dashboard-auto-redirect-url-after-login
thank you in advance :))
10 replies