anjama
Restoring repeater soft delete
TLDR:
Is it possible to make it so that adding new repeater elements will recycle soft deleted rows in a pivot table first? Or would it fundamentally be a bad idea for a repeater to recycle soft deleted rows?
Background:
My app is setup so that everything is soft-deleted and referenced by shadow tables for data history and recovery. The only place where I'm concerned with my implementation is in the pivot tables for many-to-many relationships. The soft delete and shadow table all works, but if data is deleted, and then new elements are added to the repeater, it's added as new rows in the pivot table. This leads to a situation where I can accumulate a bunch of dead rows in the data, and makes developing a way to explore the history and restore an old state more difficult. It seems like ideally I would want to recycle soft-deleted rows first before creating new ones.
2 replies
Create child entries in RelationManager on view page of parent resource
I have a CreateAction for a RelationManager to a child resource, but it only shows up if a user navigates to the edit page of the parent resource (same with edit and delete actions in the RelationManager). It does not show up on the view page for the parent resource. This means users have to be given permissions to edit the parent resource when they shouldn't be able to do so. Am I missing something to enable adding child entries via the RelationManger from the view page of the parent resource?
5 replies
Handling null id in column url to related resource
I'm using urls in my tables to allow quick navigation to the views of related records. Here's an example:
It generally works great, but in one of my tables the column of related ids has null values. These null values cause errors, so they have to be handled. What would be a good approach to conditionally showing these urls when the values are not null?
5 replies
Creating table filter in a trait
I have a table filter that works perfectly when created directly in my resources, but fails when I try to move it to a trait (I have multiple resources with the same filter).
How I'm calling it:
Doesn't cause an error; just basically clears the table. I suspect I'm messing up something related to static methods, but I'm not sure. Can anyone point out what my mistake is? Would it be a better approach to just extend the Filter class similar to how the trashed filter extends the ternary filter class? Thanks
5 replies
Laravel Excel not running in action
I have a csv importer built using Laravel Excel that works when tested in a seeder and in Tinker, but when using it with a file upload form inside of a modal, it seems like it's being skipped entirely inside of the action (doesn't even throw exceptions when there is an issue). Other code before and after the import inside of the action runs fine. Can anyone spot something I'm doing wrong?
22 replies
Design question: multiple panels?
So I'm new to filament and trying to wrap my head around the best way to use it. I'm designing a data management app with no public facing components. There will be an Owner role, an Admin role, and a User role. The idea is the Owner is mostly going to be hands off and will designate Admins, who will normally be the ones responsible for managing users and their permissions for accessing the data. The Owner and Admins will have full access to the data, whereas Users will have varying permissions. My question is, does it make sense to wrap everything under a single panel and prevent User access to certain admin specific pages, or is it better to split the Users out to a separate panel?
3 replies