Diogo Pinto
Diogo Pinto
FFilament
Created by Citizen on 10/25/2024 in #❓┊help
Panel ->assets() result in 404. What am I missing?
But the docs explain it really well
25 replies
FFilament
Created by Citizen on 10/25/2024 in #❓┊help
Panel ->assets() result in 404. What am I missing?
It’s private for the moment as I only want to share it when completed
25 replies
FFilament
Created by Citizen on 10/25/2024 in #❓┊help
Panel ->assets() result in 404. What am I missing?
De nada! 🇵🇹 if you give me your GitHub username I’ll add you to a private repository with a full guide on how to build a theme, that I’ll try to merge with the official docs
25 replies
FFilament
Created by Citizen on 10/25/2024 in #❓┊help
Panel ->assets() result in 404. What am I missing?
I always recommend Following the documentation because if the projects grows and other devs pick it up, things are mostly standard
25 replies
FFilament
Created by Citizen on 10/25/2024 in #❓┊help
Panel ->assets() result in 404. What am I missing?
Custom themes are panel based too. You can reuse a theme for other panels or create one for each
25 replies
FFilament
Created by Citizen on 10/25/2024 in #❓┊help
Panel ->assets() result in 404. What am I missing?
Creating a custom theme seems like the best way to do it. But this is Laravel/Filament, there are lots of ways to kill a rabbit as we say in Portugal
25 replies
FFilament
Created by Citizen on 10/25/2024 in #❓┊help
Panel ->assets() result in 404. What am I missing?
What are you really trying to do? If you want to customize your look and feel you can create a custom-theme, it’s the recommended way to do so
25 replies
FFilament
Created by Citizen on 10/25/2024 in #❓┊help
Panel ->assets() result in 404. What am I missing?
Root directory*
25 replies
FFilament
Created by Citizen on 10/25/2024 in #❓┊help
Panel ->assets() result in 404. What am I missing?
When making changes to your assets you can run npm run dev to watch it live. Once you’re done you can run npm run build to compile all the classes. Run this in your project’s directory
25 replies
FFilament
Created by nowak on 10/24/2024 in #❓┊help
How to add a CreateAction in the headerActions of resource A, to create a record in resource B?
->headerActions([
\Filament\Tables\Actions\Action::make('category')
->model(Category::class)
->form(CategoryResource::getFormSchema()),
)]
->headerActions([
\Filament\Tables\Actions\Action::make('category')
->model(Category::class)
->form(CategoryResource::getFormSchema()),
)]
In your other resource extract the schema to a new method like getFormSchema():
public static function form(Form $form): Form
{
return $form->schema(self::getFormSchema());
}

public static function getFormSchema(): array
{
return [
Forms\Components\TextInput::make('name')
->required()
->label('Category Name'),
];
}
public static function form(Form $form): Form
{
return $form->schema(self::getFormSchema());
}

public static function getFormSchema(): array
{
return [
Forms\Components\TextInput::make('name')
->required()
->label('Category Name'),
];
}
This should work. Importing the form directly passing a closure can mess up with livewire
23 replies
FFilament
Created by Xavi on 10/22/2024 in #❓┊help
Register colors
It worked?
7 replies
FFilament
Created by Xavi on 10/22/2024 in #❓┊help
Register colors
When you generate a color from HEX, it generates some shades based on the Colors helper. Try to change your code to
color="orange-500"
color="orange-500"
Not sure it will work though, not on my laptop to test it out
7 replies
FFilament
Created by EMMAN on 10/16/2024 in #❓┊help
Make the topbar backdrop blur
You should also add the dark: variables to enable this in dark mode
31 replies
FFilament
Created by EMMAN on 10/16/2024 in #❓┊help
Make the topbar backdrop blur
.fi-topbar nav, .fi-sidebar-header {
@apply backdrop-blur-sm bg-white bg-opacity-50;
}
.fi-topbar nav, .fi-sidebar-header {
@apply backdrop-blur-sm bg-white bg-opacity-50;
}
31 replies
FFilament
Created by EMMAN on 10/16/2024 in #❓┊help
Make the topbar backdrop blur
I put the yellow background just for demonstration purposes
31 replies
FFilament
Created by EMMAN on 10/16/2024 in #❓┊help
Make the topbar backdrop blur
No description
31 replies
FFilament
Created by EMMAN on 10/16/2024 in #❓┊help
Make the topbar backdrop blur
I think the previous answer is from an AI bot. Let me get to my laptop and I’ll try to reproduce something that works for you
31 replies
FFilament
Created by Zoltar on 10/16/2024 in #❓┊help
Table ImageColumn only for certain rows
@Zoltar glad you did it!
9 replies
FFilament
Created by Zoltar on 10/16/2024 in #❓┊help
Table ImageColumn only for certain rows
No description
9 replies
FFilament
Created by jmrufo on 10/16/2024 in #❓┊help
Autofill TextInput based on Select value in FilamentPhp
This is possible, check the following over the docs: - Form reactivity - live() method: https://filamentphp.com/docs/3.x/forms/advanced#the-basics-of-reactivity - Set the state of another field: https://filamentphp.com/docs/3.x/forms/advanced#injecting-a-function-to-set-the-state-of-another-field - Getting the state of another field: https://filamentphp.com/docs/3.x/forms/advanced#injecting-a-function-to-set-the-state-of-another-field So, this would work like:
->schema([
Forms\Components\TextInput::make('this_field_will_update'),
Forms\Components\Select::make('this_will_trigger')
->live()
->afterStateUpdated(function (Set $set, Get $get) {
$yourlogic = YourModel::findOrFail($get('this_will_trigger'));
$set('updated_field', $yourlogic->name);
})
->required(),
->schema([
Forms\Components\TextInput::make('this_field_will_update'),
Forms\Components\Select::make('this_will_trigger')
->live()
->afterStateUpdated(function (Set $set, Get $get) {
$yourlogic = YourModel::findOrFail($get('this_will_trigger'));
$set('updated_field', $yourlogic->name);
})
->required(),
So when you update the select "this_will_trigger" it will find that id on YourModel and update the textinput "this_field_will_update"
5 replies