nwalty
Best way to determine which resource a select component is currently being rendered on
What would be the best way to determine what resource a shared select field is currently on to gather the context and update the available options? I have tried using RelationManager $livewire->getOwnerRecord() but this throws an error if I access the Resource directly. I have also played a little bit with the Livewire component and form component instances but wasn't getting very far with that and wasn't entirely sure that was the best route to go with this.
EntityRoleResource shares its form on SchoolResource->RolesRelationManager and ProgramResource->RolesRelationManager. EntityRoleResource has a Select::make(role_id) where the role options would be dependent on the entity context (ie School or Program when rendered in their respective relation managers). Edit: EntityRoleResource should have all available options when being worked with directly.
4 replies
Dynamic Fields Based on Select Option Issue
I am encountering a issue with dynamic form fields. When attempting to use any form layout components within the match function the dynamic select jumps to null and nothing else happens (continues to display the default form fields). I haven't received any errors on console for this issue. When not including any layout components the form fields load as expected.
4 replies
FileUpload to AWS S3 ACL error
Morning all,
I am working on an image upload to s3. Temp file gets created correctly but when attempting to save the file I receive the following error code from S3: "AccessControlListNotSupported". This is technically correct as I am enforcing Bucket Policy. I am using Cloudfront as a passthrough if that makes a difference.
Has anyone encountered this? is there a setting somewhere that I can change? I am sure I am missing something obvious.
2 replies
FileUpload Image with morphOne relationship
I am trying to get the FileUpload field to work with all of the image morphOne relationships I have in my program. An example of one of the relationships is included below. FileUpload is being called on SchoolResource.php. School.php is related to ProgramOperator.php via the 'entity' relationship. I am guessing I am missing something painfully obvious somewhere.
EntityImage.php
ProgramLogo.php
ProgramOperator.php
3 replies
mutateFormDataBeforeCreate on wizard
I am trying to add a "from_user_id" to $data via mutateFormDataBeforeCreate(). I can dump $data before the creation and it shows "from_user_id" in the array with the correct user id. When I repeat without the dump, the user id is not saved to the DB.
7 replies