Ayz
Ayz
FFilament
Created by Ayz on 7/1/2024 in #❓┊help
Guidance needed for upgrade to Laravel 11
I originally started a project with Laravel 10.10/FilamentPHP 3.1.36. Now I want to move to Laravel 11. Are there other steps needed aside following the 11.x upgrade guide at laravel.com/docs? Can you point me to any write-up/ blog?
3 replies
FFilament
Created by Ayz on 1/19/2024 in #❓┊help
how do i sum a column across all rows of a repeater from a function in the Resource?
I can't glean this from the docs. I would like to loop through all rows of my repeater field and sum a field named "amount". Hos do I go about it?
5 replies
FFilament
Created by Ayz on 1/18/2024 in #❓┊help
how do you access properties on a resource from lifecycle hooks
I need an object filled once the create page opens so that the data is fetched once and can be referred to in each repeater field. In the resource file I have this code: public static Product $pr; How can I refer to this variable in the Create file's afterFill hook for instance?
5 replies
FFilament
Created by Ayz on 1/17/2024 in #❓┊help
how can you access a select field's currently selected option from itemLabel function of a Repeater?
So I want to add a label to a repeater item based on its content. Specifically from a certain Select field within it. The $get function returns the value but I need the label. Came across getOptionLabelUsing() but I dont know how to invoke it within a closure inside itemLabel(). What's the correct way to get at the label?
2 replies
FFilament
Created by Ayz on 1/17/2024 in #❓┊help
columnSpan not working as expected @ smaller screen sizes
No description
15 replies
FFilament
Created by Ayz on 1/16/2024 in #❓┊help
can a dependent select be made to default to first item (i.e. not show 'select an option')? a bug?
I have tried ->searchPrompt(null) on a select field that depends on another trigger field. It works half-heartedly though: on form load and picking on the trigger field, it still shows "select an option." It's only from a 2nd change of the trigger that it starts behaving as expected (which is to default to the first item). Is there a way to do it? Should this be reported as a bug?
5 replies
FFilament
Created by Ayz on 1/16/2024 in #❓┊help
Resource ''Create" route 404s: how do I troubleshoot?
No description
4 replies
FFilament
Created by Ayz on 1/15/2024 in #❓┊help
Clicking 'view' on resource with hasMany relations manager should not open in modal
I defined a relation mgr on a resource (master-detail structure) Whilst create and edit icons on each record open up as a normal page, the view button opens as a modal. Its kind of hard to zero in to this specific issue in the docs, how can I achieve it (i.e. no modal)?
6 replies
FFilament
Created by Ayz on 1/14/2024 in #❓┊help
2 resource columns from same db column
I store a simple "qty" field in a db table to represent the number of units of a product. However, it needs to be presented in the resource list as "packs" and "units". On the fly, the system should populate the columns with a rounded down division and modulo operation respectively. So 12 units of a product of 10 per pack collation should show up as 1 pack, 2 units (2 separate columns) Filament is however ignoring a 2nd TextColumn::make call to same database column. How can I achieve this objective? Like if a column could be made out of a function defined in the model.
2 replies
FFilament
Created by Ayz on 1/12/2024 in #❓┊help
customize logo behaviour on desktop sidenav collapse
When the side nav is collapsed, I would like a smaller logo to still show to the left of the '>' sign. Can this be done through hooks/ style customization?
9 replies
FFilament
Created by Ayz on 1/12/2024 in #❓┊help
how to place a custom nav item under a navgroup label
In my panel I have: ... ->navigationGroups([ 'Main', 'Other' ]) ->navigationItems([ NavigationItem::make('Sub') ->parentItem('Other') ]) The intention is for 'Sub' to appear under 'Other' but it doesn't appear. When I replace 'parentItem' function with 'group', it blows up. When I don't have either parentItem or group, the 'Sub' item is placed somewhere else entirely within the (other) resource navigationItems. How do I get it right?
4 replies
FFilament
Created by Ayz on 1/12/2024 in #❓┊help
how to customize fi-sidebar-nav-groups
To reduce the spacing between the NavigationGroup's label and regular navigation items's label, I need "gap-y-7" changed to "gap-y-2" in "fi-sidebar-nav-groups". So in resources/css/app.css, I have tried: .fi-sidebar-nav-groups { row-gap: 0.5rem !important; } Also tried using @apply gap-y-2 !important; Neither makes a difference. What is the right way to do it?
4 replies
FFilament
Created by Ayz on 1/8/2024 in #❓┊help
Resource Lifecycle hooks wrapped in a transaction
I would like to confirm, as implied by the title, that its all or nothing in terms of DB operations across the lifecycle hooks. For instance, in afterCreate hook of a resource, I intend to insert records in another table and update yet a 3rd. If I throw an exception at any stage, all preceding DB operations will also have no impact, including the resource. Is this a correct understanding of how filamentphp works? Or do I need to start the transaction explicitly?
4 replies
FFilament
Created by Ayz on 1/7/2024 in #❓┊help
Fully customize login screen, possible?
Looking at the docs, I couldn't find a way to totally customize the login screen (e.g. add an additional field, reposition elements, add a picture). Is it possible in a way that a future Livewire update doesn't overwrite?
4 replies