Filament

F

Filament

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

Join

SpatieMediaFileUpload how to set value using another model already existing file

$set('nationaliy_proof', [$user->getFirstMedia('nationality_proof')]);
$set('nationaliy_proof', [$user->getFirstMedia('nationality_proof')]);
``` SpatieMediaLibraryFileUpload::make('nationality_proof') ->label('Nationality Proof Document (Aadhar/Voter ID)') ->collection('nationality_proof')...

Only 1 i can add in repeater

I use custom page and custom widget but only 1 i can add. my code use InteractsWithForms;...
No description

Filament v4 testing with Pest

Hi all, how can I add data-test attributes to elements I want to test out? I would like to assert some things on the elements such as tables, widgets.. etc ```php $page->assertSeeIn('body > div.fi-layout > div.fi-main-ctn > main > div > div > div > div > div:nth-child(1) > div > div > div > div > div > div > div > div > div > section > div > div > div:nth-child(1) > div > div > div > div.fi-wi-stats-overview-stat-value', number_format($totalTributes, thousands_separator: '.'));...

Filament v4 registration with Breeze: handle roles and team creation for multi-tenancy

Hello, I'm working with Filament v4 and Laravel, and I’m trying to figure out the best way to handle roles during user registration. Here’s what I’d like to do:...

Is is possible to start an action listening to an event ?

I've tried this: ```php $this->dispatch('open-adauga-cerere', [...

Manually triggering a modal action

Is it possible to use modals for edit actions, but keep the edit URL active? I've got a custom widget and I want to view some details about a model there - ideally in a modal instead of redirecting. How could I force a "view action" inside a href? Is that even possible?...

Disable Filament Tenancy Scoping for a Model

Is there any way to disable filament automatic tenancy scoping for a model? Take this Role model for an example, ``` class Role extends SpatieRole...
Solution:
I have tried that using
protected static bool $isScopedToTenant = false;
protected static bool $isScopedToTenant = false;
but to no avail. I have been only able to use the newQuery to fix it....

How to accurately render RichEditor in Vuejs?

hello, i have a RichEditor in my Filamentphp like so
RichEditor::make('description_en')->label("Description (English)")->columnSpanFull(),
RichEditor::make('description_en')->label("Description (English)")->columnSpanFull(),
and in my Vuejs project's app.css i import the filamentphp css per the documentation...
Solution:
it could definitely do with tidying up on our end, but its not supposed to look 100% identical because ours is an editing experience, so we need more borders etc to allow things to be moved and resized

Markdown Editor: Array to string conversion error

I have a relation manager with a form which contains a markdown editor. 1. The problem is every time I´m trying to create a record with CreateAction I get this error: Illuminate\Database\QueryException: Array to string conversion. 2. When editing a record with EditAction my text of the markdown editor will be saved like this in the database:...

requiredWithoutAll() doesn't seem to be working

I am attempting to use requiredWithoutAll() on a custom page. This is my condensed code: `<?php namespace App\Filament\Pages;...
Solution:
The issue I had is that $data = $this->form->getState(); needs to be called in save() for these validation mechanisms to take place.

Delay with Toggle when is live()

Hi guys! I have an issue with 2 toggles the first one is live() with afterStateUpdated() method and second one should be switched true by clicking the first one and otherwise when the second one is switched true and clicking on it should switched to false and switch the first toggle to true, and for this issue I'm facing delay more than 1 sec please any help for this??...

How to create "cards" on create and edit

Like this:
Solution:
Use Sections to group your form components
No description

RichEdit grid not work properly

at edit not like at view I do all "prose" types , it do the same :...
Solution:
I’m thinking there is a bug. Please submit an issue. The way the grid is built should work without prose except for the breakpoints/responsiveness that depends on custom styles.
No description

RelationManager not visible in Resource's own tab

public static function getRelations(): array { return [ RelationManagers\TicketLogsRelationManager::class, ];...
No description

Issue with user menu items rendering with SPA

Hi, I have user menu action that is edit profile in AdminPanelProvider, nothing special i add form, fill it out and than save. And it works on inital page load, but after each next page visit component get's deleted ...

Registering new colors on filament

I want to register a new color "secondary" color. I followed the steps right here: https://filamentphp.com/docs/4.x/styling/colors#registering-extra-colors But it seems like it does nothing, what i tried: - instead of using "secondary" i used a random name just to test and still nothing works....

Using Blade Tabs to filter `getFooterWidgets()`

Situation - I have bunch of widgets that get generated. - added filter tabs across the top with the blade component - the tabs switching changes the data, but doesn't show the correct ones ...

Access Resource with a PIN

Any suggestions on how to proceed when a Resource is accessed, requesting a Modal or Page requesting a PIN (from users) as a way to access the resource?

larazeus Inline Chart with custom data?

Hi all! Unfortunately, with “lara-zeus/inline-chart,” I have only found the option to use $this->record as data for the chart. However, I would need it in a table where I can use/pass custom data....

Filament auth guard logout

I'm using two different guards for users (web) and admins (admin). For users, I can destroy the web guard session when logout. Since I use filament for admin panel, its custom logout destroys both web and admin guard sessions. How do I make it so that when admin logout it only destroy the admin guard.