ericmp
Cant make reverb to work inside admin panel
i have a project where i use livewire and laravel reverb. it works
now, i tried to add a filament admin panel, and followed the docs to configure it properly. the problem is that i get a weird cluster error when i go to any page of the admin panel. afaik reverb doesnt use clusters!?
10 replies
How to sort table by relationship?
i have item model: name, created_by_id
i have user model
so i have the relationship in the item model: user (which returns the user who created the item)
in the items filament table im showing the item's user's created_at field
now, i want to be able to sort the items by the user created_at field. so i want to sort them by the relationship
how can i achieve it?
31 replies
How to make all tables have same options for pagination?
Im not using admin panel, only tables pkg. How to make all tables have same options for pagination? I dont want to define it for all tables, i want to define it only in some place and then it applies to all tables of the project. How?
6 replies
How to configure reverb with filament?
i want to be able to chat in admin panel.
i installed laravel broadcasting and reverb
I, following this tutorial https://laraveldaily.com/post/configure-laravel-reverb-filament-broadcasting, did:
php artisan vendor:publish --tag=filament-config
but now i have this:
but i dont use pusher, but reverb
idk how to make it work, i tried:
then i do npm run build
but i always get in console dev tools:
134 replies
How to add header text for widget groups
I have a filament admin dashboard with some stats widgets:
stat 1 --- stat2 --- stat3 --- stat 4
stat 5 --- stat6 --- stat7 --- stat 8
i want to separate them somehow and add a header on top of them, something like:
general data:
stat 1 --- stat2 --- stat3 --- stat 4
storage data:
stat 5 --- stat6 --- stat7 --- stat 8
how would u do it? is possible with filament3?
so far i managed to create 2 different widgets. the first one is the general data one, and the other one is the storage data one. so yeah, they are separated, but i need to add a header for each.
21 replies
Add maxlength to 255 chars on TextInput by default
For all my TextInput fields, I want to set a default maximum length of 255 characters, which is the commonly used VARCHAR length for database fields.
I tried implementing this in
app/Providers/AppServiceProvider.php
:
However, I encountered an issue: if the TextInput is numeric or decimal, validation fails when the number exceeds 255.
So, I attempted to conditionally apply the maxLength only if the input is not numeric or decimal:
But this approach doesn’t work because configureUsing is called before the component is used in the code, so inputMode is always empty.
What should i do?7 replies
Filament ResetPassword notification - set locale correctly
i do:
the email i get is in english. why? im setting the app locale in catalan before sending the notification. why is sent in english?
then i saw that in my env i have:
and if i change the env to:
and i get the email in catalan.
but i dont want to change the APP_LOCALE
i want the notification to be sent in the language i set before the notification is sent. how to achieve it? i thought doing app()->setLocale('ca') would do the trick, but seems is being ignored
5 replies
How To Apply `->imageEditor` on FileUpload v2?
I want the user to be able to use the image editor when uploading an image. But in v2 is not available. What would u do to achieve to let use the image editor? Update to v3? Or is there a way i dont know that this may be achieved in v2? like somehow creating a custom component like v3? but im not sure if that can be done.
11 replies
How to Check Unique Field Names Across Sections in Nested Repeater?
The user is filling a form which creates this structure (an array of sections containing fields):
The problem is that i want the names to be unique. For the sections, is easy:
But then, for the fields:
I don't know how to specify that I want them to be unique for the current section but also in other sections
What would u do?
3 replies
Convert model method to eloquent relationship
imagine this scenario
tables:
eloquent relations:
right now, using only eloquent relations, i can know which is the latest and also which is the oldest user linked to the task.
this is how it would look like the task model but wrong for this case, since they return
?User
, but as i said, i need the methods to return eloquent relationships:
as you have noticed this is a has many relationship. and it works fine.
but my question is how to translate this into a belongs to many relationship.
as in the has many relationship case, for the belongs to many relationship i want:
- to be able to retrieve task's users as an eloquent relationship
- to be able to retrieve task's first user as an eloquent relationship
- to be able to retrieve task's oldest user as an eloquent relationship2 replies
Add Action For Table Group
Lets say i have a table of posts grouped by user_id
i want to add an action that will publish all posts of that user id.
is there a way to add an action next to the row group?
this way, id be able to publish the posts with a specific user_id at once
for this specific example seems like a scoped bulk action for grouped records. but i dont mean this. imagine that the action will be something different, like updating a user field for whatever reason. is more like a header action, but for the group, which would return, in this case, the
user_id
, and then the developer, would do whatever has to be done with that id9 replies