Filament

F

Filament

Filament is a collection of beautiful full-stack components for Laravel.You can get help using it on our Discord.

Join

Displaying CheckboxList across multiple Fieldsets using relationship

I have Fleets, Vessels and RemoteScripts. A RemoteScript belongs to many Vessels via a pivot table, a Vessel belongs to a Fleet. When I do CheckboxList::make('vessels')->('vessels', 'name') it works and displays all the Vessels in the list, checking and unchecking boxes is reflected in the pivot table. But I would like to display each CheckboxList in a Fieldset for each Fleet....
Solution:
@Dennis Koch I managed to fudge something together... I won't post the code cos its a mess but if someone did have the same problem I am happy to share it 🙂 I ended up using afterStateUpdated, default and afterStateHydrated to get it going how I wanted... probs a better way but for now I just needed the functionality 👍

Query string null in a relationmanager

I can read request()->query('group') in ViewUser::getTitle just fine but in UserResource's ResultsRelationManager it returns null. Is there a way to read URL query strings in a relationmanager, or some other way to pass data from Resource to Relationmanager? I need to alter both UserResource infolist and the ResultsRelationManager table under it based on this query string. 🤔...
Solution:
in your relation manager if you would add property $group and set it as Url livewire attribute. does it work then? ```php use Livewire\Attributes\Url; #[Url]...

How to refresh data balance when action is done in resource simple modal?

return $form ->schema([ Section::make('Information') ->schema([ Forms\Components\Grid::make()...

Validate KeyValue field (value) to be numbers only

How to Validate KeyValue field (value) to be numbers only?

getting form data from filament Repeater

Hi everyone, I am using filament repeater and everything is fine when using ->relationship(). The data is updated on edit correctly. But I want to access the information inside repeater forms before saving changes in edit action, and $data shows empty array while I have some data in my repeater. Here's code in edit: `namespace App\Filament\Resources\OrderResource\Pages; use App\Filament\Resources\OrderResource;...

It's possible make drag-and-drop with filament?

Hello friends, a question, is it possible to do drag-and-drop with Filament, to move to different positions, for example, images, texts, buttons, etc., this in a dashboard with Filament of course! As a separate topic, is it possible to do it with Livewire for the front of a site? I'm looking for some information on whether it is possible for both cases or would it be best to use JS in the front and dashboard for such a case?...

FileUpload with S3- How to?

I am using FileUpload field in a filament panel resource. I can get it to upload to a local folder, but am striking out using S3. I have the disk set correctly, folder exists on S3. What I want to do is: - user can upload multiple files (mostly pdf) - works n ow - to an S3 bucket - doesn't give any error message, but file not uploaded...

Anystack Billing Page Error

Hi, I wonder if anyone has received this error before? I get this error when trying to move forward on the Manage Billing page for product. I have been trying again and again for a few days, but I keep getting the same error. I also sent an e-mail for support, but there is no return....
Solution:
Hi. I had this error because my IP was not supported by this integration of Stripe. I use a vpn and it was ok. Maybe you have the same issue...
No description

Resources are not rendered

"bezhansalleh/filament-shield": "^3.3", "ibrahim-bougaoua/filaprogress": "^0.1.0" "joaopaulolndev/filament-edit-profile": "^1.0" "tomatophp/filament-simple-theme": "^1.0" Hello, I created my project and everything is normal, but I installed some libraries as normal and it works normally, but when I create a new resource, it does not render in the dashboard....
Solution:
I really don't know what could have generated this, but I created a new project and started reconfiguring and now it's reading the new resources, thanks for the help.
No description

HeaderActions stops working with HasTable

``` class MyPage extends Page implements HasInfolists, HasForms, HasTable { use InteractsWithInfolists; use InteractsWithForms;...

Suffix Action Position on InfoList Builder

I have a View Resource page with an infolist. I wanted to allow inline editing on specific fields, the closest I could (easily) come up with is an suffixAction to open a modal with a form field. However the action is way off as far right as it can. Is there a way to position it to be immediately next to the text value?
No description

When dispatching a job and passing a model ... Is model beibng create or Update

I am passing the $record to the job but how do I know if it is a new record or an update? \App\Jobs\AirtableSync::dispatch($record); in job: ``` public function __construct( public Lead $record )...

Select field with dynamic multiple prop, when is false cant keep relationship to belongstoMany

Using a Select filament field with dynamic multiple property, when is false cant keep relationship to belongstomany I have this code that handle clients on a treatment, the relation between this model is a belongstomany, when the device is single the multiple propertie on client select is false, and when is grupal is true. When multiple is false, filament handle the relationship as a belongsto instead of belongstomany. I would like to keep the relationship as it is, either is 1 or many clients. Is there a way i can make filament handle the multiple false as a belongstomany relation?...

Optimizing Queries in FileUpload – How to Avoid Duplicate Calls?

Hey! I have a problem that’s really bothering me – in the FileUpload component, I have two queries: $record->attachments()->get()->pluck(value: 'file_path')->toArray(). I’m trying to figure this out and optimize it, but I’m stuck and running out of ideas. My resource has access to a relational table where attachments are stored. I’m only interested in the ones linked to this specific record. The current form of this code annoys me because I know it can be done better and more efficiently. I really want to avoid leaving it like this, but for now, I don’t have a solution. Maybe someone has an idea on how to improve it? ```...

Route query string values don't persist with pagination in Table

Hello , good evening i need help here is my code : ```php public static function table(Table $table): Table {...

Question on filaments admin panel logout

On my application i would like the user to be gracefully logged when when the they "log out" when their session has expired/cookies removed from browser However my application throws a 419 because the logout request is a post and uses a CSRF token and i have no valid CSRF token anymore However filaments admin panel logout is also a post with a CSRF and i do not get a 419 when logging out of filament after removing all my cookies...

Table results missing

I have a filament table that is sorted using a tab: `public function getTabs(): array { return [ 'future' => Tab::make('Planning')...

Permanent filters during user session

Hello I'm building an application in which I would like the filters applied by the logged in user to a table to be maintained during the logged in user session, so that the filters are not deleted when the page is reloaded. I've been looking for information and examples but I haven't found anything....

Dependent select without parent being saved to the database

I have a simple form based on a WorkOrder. A WorkOrder belongs to an Equipment. An Equipment belongs to a Location. Therefore, a WorkOrder belongs to a location through an Equipment. I have a dependent select working for the most part: ```php...
No description

Page filters and Expose Table to Widgets

Hello, I'm trying to send the query data from my table to my StatusOverview Widget using ExposesTableToWidgets. The problem I have is that the query from the table uses date filters from Dashboard page and when I dd the pagetablequery on my StatusOverview appears empty. If I remove the date filters from the query and put hardcoded dates it works. How can I fix it?...