Filament

F

Filament

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

Join

open action depending on get parameter

Hello, I have a controller that create automatically a resource for a specific entity, then it redirect to the index resources pages. The goal is that the user click on a link in an email, it create the resource, redirect to the index page, AND open a specific custom action....

upload image from afterStateUpdate of another component

i have a form where I have an image upload input with a few other fields. One of the fields is for barcode, the ideal action I want is the server to check external api if an image for it exists, and if it does, fill the image in automatically in the image upload input. This is my current code, but it seems like the front end preview component is stuck on waiting for size. I don't know if I'm doing it the wrong way, since I've tried a few other ways but this is the one with which I was able to get the farthest. Image Size Is under the file upload limit, so I don't think that's the actual issue. ```php...
No description

Problem with the user menu on Docker with Ngnix

After installing the project on Docker with Ngnix , the menu is visible throughout the window. Have you had this problem ? I tested not only on the local Docker but also on an external server. On the local Herd it works without any problems.
No description

disable color picker focus on edit model

How do I disable the input focus in edit modal? ->autofocus(false) doesn't seem to work on the form()...
No description

How to hide dashboard from "Dashboard" depending on user role?

I want to know if there is a way to have a policy that restricts a user based on there role. Lets say my role is admin, then I can see the dashboard.. but when my login and my role is user I want the dashboard link or url to be unauthorize to non admin roles. I can restrict other resource based on policy on viewany policy method. but I can't seem to find a way to do this for the Dashboard....

Filepond tap to cancel does not remove file

I unable to tap to cancel uploading file, file stuck was caused by internet disconnection Filepond configurations ```php FileUpload::make('attachments')->label('Invoices')->disk('s3')...
No description

canAccess function generate a lot of duplicate queries

Hello, I have a custom page in filament and I want to restrict acces to it only for some users, for this I'm using the canAccess function from the filament Page class this is the condition: public static function canAccess(): bool {...
No description

Plugin [awcodes/curator] is not registered for panel [customer].

Hello everyone! I've run into a bit of an issue. I have three panels: Admin, Operator, and Customer. In the Customer panel, I don’t plan to use the awcodes/curator plugin. When it’s listed under ->plugins() method in CustomerPanelProvider, everything works fine. However, after removing it from the plugins list in CustomerPanelProvider, I get an error: Plugin [awcodes/curator] is not registered for panel [customer]. At the same time, the plugin isn’t listed in **Ope...

Is there a better way to write this x-init?

Is there a better way to write this: x-init="@this.call('loadCastData')" in a blade file? Currently prettier has some issues with the syntax of the quotes.

Table Filter Custom Option Html

Hi all, In my resource $table, I want to have custom html in one of my select filters. ```...
No description

File upload customization

If I want to add a "File Type" enum to Filament's FileUpload form field, what's the best way to do this? If I'm not mistaken it's using Filepond so it's not very easy to customize correct? If so then what's the best 3rd party plugin I can rely on in order to be able to categorize uploaded file types? I'm not really looking for a full file manager, just something that is easy to use and doesn't require a license.

DatePicker problem accessing the field from the relationship

I'm struggling with this specific problem on DatePicker, so as last resort i'm trying to write there. Basically I have a birth_date (type date) field on the sql. I'm accessing this field on two different resource. The first one is the resource itself of the table, and works correctly: ...
Solution:
solved with this casting on the model: 'birth_date' => 'date:Y-m-d' no idea why i needed to explicit the casting format, otherwise from the relations the picker can't grab the correct one....

spotlight ManageRelatedRecords

With spotlight, I have an Organisation model, then a relation to users with a ManageRelatedRecords class. I have defined getGlobalSearchResultTitle() in my relationship class, but when I search with spotlight, I just get a list of 'organisation' rather than the actual name?...
No description

Help with form outside Panel

I'm learning Filament / Laravel so apologies if it's a stupid question. I have bought the minimal theme; works great within the Panels but i want to create a simple page with just the form. The form displays nicely but i'm missing some scripts Here's my controller...
No description

Adding a list of placeholder variables to the RichEditor component

We have a RichEditor component and we'd like to add a dropdown so that the user can select placeholders that can be injected into the text area like [[companyName]], [[companyAddress]]. Does Filament allow for this?

Exporter keeps returning empty file

I am new to PHP and Filament and I am trying to build an exporter to export PricingImportLanes that have a matching pricing_import_id to the triggering PricingImport record. Essentially a user can upload an excel file (this is the pricing import) and each row is parsed out into a pricing import lane. I want the lanes to export to an excel file when that pricing_import's export button is clicked. At this time the column headers are the only thing in the spreadsheet that exports and the "exporting X row" always matches the number of rows in pricing_imports not the number of rows to be exported from pricing_import_lanes. I've attached a working exporter from our system that is similarly purposed and its models, as well as the PricingExporter that is not working and its models and resource....
Solution:
Heh, I had to put it in a relation manager so it would return the data from there. I'm dumb. Case closed! 💗

Select with live() and searchable()

Hi all, I am trying to make a double select (depending on relation) that is searchable. First of all I made a new component with artisan make:form-field to create a re-usable component. This component has the following schema, pretty much following the documentation...

filament route - default to a landing page instead of login

I'm building a saas app where having 2 filament panels. 1 for the SAAS admin and 1 for the tenant. * localhost > routes to the welcome page ( as defined in the web route file) * localhost/saas -> routes automatically to the localhost/saas/login page - after login you go to localhost/saas...

Resource as Navigation Parent of Custom page

I am currently trying set a resource page as navigation parent of a custom page. when setting the navigation parent of the custom page by changing the navigation parent property, it simply disappears. class TimeEntriesOverview extends Page {...
Solution:
Solved it, the necessary attributes to set are ```
protected static ?string $navigationGroup = 'Zeiterfassung & Ausgaben'; protected static ?string $title = 'Übersicht Zeiterfassung';...