Matthew
JSON relationship column in table
I have a table with a JSON column, like this:
In my model, I cast it as an array:
And in my resource table,
Using tinker, the column is saved on my table like this:
How should I define my relationship such that the resource table shows the name of the users? I havent used relationships that much so Im a bit confused 😅
4 replies
Fileupload doesnt save original name in attachment_file_names
I have this action:
But after successfully uploading the file, the record is null. I did set
attachment_file_names
as a json collumn in my migration, I added it in the $fillable array and its casting to array57 replies
Cant download file from storage
I have created a file in a directory using makeDirectroy(). Then Im trying to download it using storage::download(), response->file(), response->download(), I ALSO tried using controller but none of them are working either... Im very stuck and confused...
I have a private storage if you're wondering
Does it have to do with permissions or something?
60 replies
Using Getters in forms
When using Get $get in forms, and you want to get the value of lets say a component that is AFTER the component that has the getter, it will return null. For example:
Is this intended? I assume the components in the form are processed linearly, but wouldnt it be better for the Getter to check all the components and not just the ones that "have already been processed"?
35 replies
Tailwind class not found in plugin
I have a page on my plugin, and I want to use the
rounded-r-lg
class. However, its not applied which makes me think that its not found by tailwind. Am I missing somethign?
I dont have any css files in my plugin39 replies
How to "rerender" custom elememts in blade using alpinejs
I will try to explain this the best I can. Assume I have this blade file:
Everytime
message
is changed, I want to rerender customEl. Due to the nature of that component, just having x-text isnt enough. As I said it needs to be rerendered, but Im not sure how I can approach this. Any ideas?5 replies
Use HeaderAction to upload file in FileUpload.
Assume I have a fileupload component in a form on my page. By pressing a header action, is it possible to upload that file (to the specified disk)? Generally when you upload something, before you press create, that file is sitting in the livewire-tmp directory, and its only when you press "Create" that the file goes to its proper directory. In this case, we dont have a create action or a model.
4 replies
FileUpload max size validation isnt working
if I upload a file of size > 12MB, it gets rejected for being too large. However,
post_max_size
,memory_limit
,max_upload_size
,upload_max_filesize
in the ini file are all over 128MB, and the validation, still considers 12MB as the limit. Am I missing something?3 replies
Allowed memory size of 134217728 bytes exhausted (tried to allocate 31817560 byte
How can I fix this error? Im using a forked version of filament because I working on a PR. (Since v4 doesnt build yet im testing it on v3)
Everything was working fine until suddenly I got this message. I was playing around with table.js. When this happened I reverted back to HEAD and I still get this error. I cleared laravel cache, views and I even restarted and I still get the error. Does anyone have an Idea?
5 replies
How can I get started with a JS field?
I want to create my own filament field (Slider) which is based on JS nouislider
This is currently an Issue on github for filament 4.1. I want to get a jumpstart on this, and even if it doesnt get merged, at least I learned something new 😅
The problem is I have NO IDEA how to get started with javascript plugins. For starters, I added nouislider in the package.json. Furthermore, I've also create the Slider class, blade and JS file as follows:
packages/forms/src/Components/Slider.php
packages/forms/resources/js/components/slider.js
packages/forms/resources/views/components/slider.blade.php
In the create page, I have the Slider field, but when the page is loaded I get this error:
Alpine component with ID [slider] not found for package [filament/forms].
What am I missing? Can anyone help?22 replies