Filament

F

Filament

A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire

Join

Confused with given Filament demo structure

I am working on a project in intership and I received something like a demo to be placed on fresh Laravel/Filament project. I had tried to use Filament a little before to acustumed to how it works and as I understand you make resources with command and they go to app/Filament/[Name]. This demo doesnt have app/Filament folder but it has app/Providers/Filament inside it provider files for all 4 panels I was told about. Also in resources/views/filament there is 4 folders with same panel names like...
Solution:
I had to do ```php artisan config:clear php artisan route:clear php artisan view:clear php artisan cache:clear...

How to access form state in Custom Livewire component

I have a form with: public function form(Form $form): Form { return $form...

Github Action Closes Issue Even When All Fields Are Filled

I have an issue I just opened: https://github.com/filamentphp/filament/issues/17944 It was automatically closed by the bot due to "Needs more info". However, I have a repo listed and all field filled out completely in the issue. You might want to check the bot's settings and modify it so legitimate and properly formatted issues aren't closed. @Dan Harrin (Also, please take a look at my issue and reopen is possible.)...
Solution:
I removed your duplicate "Steps to reproduce" heading and the bot reopened it automatically

CSS not being applied to my tables

So I am completely new to filament, I just installed filament into my app. I followed the steps provided by the documentation. I am working on laravel. Basically my steps were: - Installed filaments/table only - then installed filaments...
Solution:
Do you still have a postcss.config.js ? If yes: Remove it

Multiple Model Export Action

What I am trying to do: Trying to create a custom export action in v4. From a single button, I want a trigger that will call multiple separate exporters (and therefore multiple CSV files exported). Essentially a streamlined way to export an entire database. What I did: Tried to make an action, with two exporters as that action. Clicking the button doesn’t appear to trigger the exporter. I’ve also tried extending the default exporter classes but still couldn’t figure it out. I fear this is incredibly simple but I’m too far into the woods. I’m not very comfortable with actions and classes, any help or suggestions would be appreciated....

Trying to make a rich editor plugin with @tiptap/extension-invisible-characters

Followed the doc. I have no console errors and the js is imported. But it looks like the plugin is not loaded. The commands don't exist in the editor $getEditor()?.commands.toggleInvisibleCharacters() ...

Modal closes only on certain field when I click away

I just upgraded from filament V3 to V4 and noticed modal isn't closing when clicking away on certain field. I have ->closeModalByClickingAway(true) on my modal, when I'm on 'title' field and click away the modal doesn't close, I don't get any error anywhere, when I then click on 'content' field, I can click away and the modal closes, again no errors anywhere. Any ideas? Code in test123.txt

Refresh nested RelationManager (C) when B changes in Resource (A)

Content: Hi, I have a Resource (A) in Filament 3.x using Livewire in the main Resource. ...

Table with Records (no Query) crashes while using summarize

Im using a table with static records and want to show a sum at the end of the table with the summarize method. Here is my code: ```php return $table...

When opening and closing modal I get: "Could not find Livewire component in DOM tree"

I just upgraded to filament V4 and found out this is happening, but can't figure out why. I've found two posts related to this on here and one online regarding grammerly extension causing issue, but nothing helps me here. Tried with Brave and Firefox, same thing. `public function editTableAction(): Action...
Solution:
Found out the issue, so if I comment out the live() method it's not causing error any more: `RichEditor::make('content') ->required() ->maxLength(65535)...

Custom Page

until now i cant understand how can i use custom page. How can i create like timeline that filament dont have. How can i use livewire function for that. Can anyone enlighten me?
Solution:
Pages are just Full-Page Livewire components. You can do anything that you can do in Livewire or Blade.

Can I default a Resource relationship to show an edit form instead of table view?

I theorise that I would like to do this in two scenarios: 1. On a one-to-one relationship 2. On a one-to-many, however I will specify a single record to display via a URL parameter....

Filament Helpdesk Plugin

Hi! We submitted a PR for our plugin to the Filament repository (https://github.com/filamentphp/filamentphp.com/pull/990). Could we get an update on when we can expect it to be reviewed and potentially merged? We're excited to contribute and really appreciate your work!
Solution:
Plugin submissions are usually reviewed once per week or whenever Saade has the time for it.

Can't use Tailwind-classes anymore after update to Filament V4

Hey - after following the upgrade-guide from Filament 3 to Filament 4 it does not seem to recognize tailwind-classes anymore. I'm using a view for my resource-column-label which does this: ``` <div class="flex items-center" @if($tooltipText)x-data x-tooltip.raw="{{ $tooltipText }}"@endif> @if($searchable)...
Solution:
did you run the npx upgrade? You are right looking at V4, but you need to include your blades in the v4 classes see: https://filamentphp.com/docs/4.x/styling/overview#using-tailwind-css-classes-in-your-blade-views-or-php-files So you should have a path to your custom view folder....
No description

Setting an error message to a field manually

Is it possible to set an error message to a field manually within afterValidation? Using a notification doesn't really fit here. ``` ->steps([ Step::make('group selection') ->schema([...
Solution:
depending on what kinda place it is the field name may change
$livewire->addError('mountedActions.0.data.group_id', 'My error!');
$livewire->addError('mountedActions.0.data.group_id', 'My error!');
...

Filament v4 grid , gridDelete and textColor not found in RichEdit

Filament V4 grid , gridDelete and textColor not found in RichEdit toolbar although its found in doc ,...
Solution:
They are there. Are you on the latest version?

OptionStateCast forces casting of option keys to integer

@Dan Harrin Any particular reason why would you force the type to integer? This last update does solve for keys starting with zero, but to be honest I currently don't agree. In my particular case, I have keys in this fashion "0011, 1025, 5568" which I'd like to keep as strings no matter what. Changing the type throughout the application can have side effects. My DB columns is JSON and the values get's stored as string in case of leading zeroes and integer in other cases. I solved this with setting my custom cast with ->stateCasts(), now after this update: https://github.com/filamentphp/filament/pull/17902/files I solved with Cutom Laravel casts, since you keep numbers starting with zero as strings. Not everyone knows this if they don't source dive and will have issues....

<x-filament-panels::resources.relation-managers>

How can I render a relation manager’s UI inside my own custom view in Filament v4 now that the <x-filament-panels::resources.relation-managers> Blade component is no longer available? What’s the recommended way to embed a specific resource’s relation manager in a custom page/view?
Solution:
yah works 😄 thx a lot...

RichEditor and Spatie Media Library

I'm using Spatie media library and it's filament plugin, i followed the instruction on setting up my model aso that i can use it with RichEditor TicketModel: ``` ...