Ralph Morris
Price (in pence) field - show result in pounds in suffix/or somewhere else that's sensible
Hi, I am attempting to let a user enter a price in pence, and then show them the converted amount in pounds in a clean and simple way. I hace tried the following but unfortunately the suffix doesn't get updated.
Any ideas on how I could achieve someting like this? Thanks!
6 replies
TextInputColumn on pivot table inside relation manager
I have a relationship manager on a pivot table, and a
Tables\Columns\TextInputColumn::make('note')
the note field exists on the pivot table. This is output successfully in the table list. However, when editing the column it tries to save to the related table instead of on the pivot. Is there any way that I can override the save functionality on the TextInputColumn to save on the $model->pivot table? Thanks!3 replies
Uploading file and setting max width/auto height
Hey all, hoping someone can help.
I have the following code:
I am trying to upload an image and reduce and images that are too large to max 1288px width, whilst keeping the height dynamic. However, the above code stretches a smaller image to hit 1288px width.
How can i stop it stretching the image and only reduce the size if too big?
Thanks
1 replies
Modify query in Resource if not searching
Hey all, I am trying to only include top level pages on a PageResource by modifying the eloquent query on the PageResource. You can then access child pages via a PageRelationshipManager. However if a user searches, I want to include the child pages in the PageResource search result. My code is below:
This works if you refresh the page as request('tableSearch') returns the seaerch query. But if you just search and let livewire do the ajax search, request('tableSearch') returns null.
Any ideas? Thanks
6 replies
League\Flysystem\UnableToRetrieveMetadata Unable to retrieve the visibility for file at location:
Hey all, hoping someone can help.
Filament Version: 3.2
Laravel: 10.43
league/flysystem-aws-s3-v3": "^3.0"
I am getting the following error when trying to upload files to S3 through the RichEditor. S3 uploads work fine with a simple FileUpload field, and also using Laravel Media Library file upload field, but during upload inside an editor I am getting this error:
League\Flysystem\UnableToRetrieveMetadata Unable to retrieve the visibility for file at location:
My code:
I tracked the error to line 120 of the HasFileAttachments trait which is inside a method name handleUploadedAttachmentUrlRetrieval()
.
Line 120: if ($storage->getVisibility($file) === 'private') {
The getVisibility method is throwing the error. However, the file is successfully uploaded to S3 and $file is pointed at the correct location: example: attachments/QB4Gc4ioPAaBnvPkYIeGVjqBT7LQakY0qAqVL1cB.jpg
When commenting out the if statement on line 120 to test, the image does render in the editor but I have no idea why it can't read the visibility.
Any help appreciated!
Thanks
Ralph20 replies