403gtfo
403gtfo
FFilament
Created by gausoft on 8/18/2024 in #❓┊help
How to use different logos for the login and the sidebar ?
No description
10 replies
FFilament
Created by Neamix on 11/4/2024 in #❓┊help
Call a function after change SelectFilter
Try ->afterStateUpdated( ) Link to Doco: https://filamentphp.com/docs/3.x/forms/advanced#field-updates
3 replies
FFilament
Created by Neamix on 11/4/2024 in #❓┊help
Dynamic Filter
I've done some similar stuff. You can use a combination of Get, hidden(), live(), and a function in your options() Get - Gets another field's value live() - lets the field update after load hidden() - Use a function with some logic on pet_specie_id that uses Get to check pet_type_id. If pet_type_id is not set hide pet_specie_id options() - again, use a function with logic in pet_specie_id that Gets pet_type_id and pulls the right option array. There is probably a nicer way, but hope this puts you on the right path. Also side note: if you add swift after the three backticks in your code block it will color code stuff like this:
Test::make('this')->live();
// Cool huh
Test::make('this')->live();
// Cool huh
Link to doco: https://filamentphp.com/docs/3.x/forms/advanced#injecting-the-state-of-another-field
3 replies
FFilament
Created by joao nivaldo on 10/24/2024 in #❓┊help
Change relation manager label
It'll be one of these little vars in that file I sent the path to.
12 replies
FFilament
Created by joao nivaldo on 10/24/2024 in #❓┊help
Change relation manager label
Ooooooo I see yup Try
swift
protected static ?string $label = 'something
swift
protected static ?string $label = 'something
Sorry I didn't realize with the different language sorry.
12 replies
FFilament
Created by joao nivaldo on 10/24/2024 in #❓┊help
Change relation manager label
A lot of these cool things can be found if you open the relation manager fire. Some even have handy comments 😄 Path: vendor/filament/filament/src/Resources/RelationManagers/RelationManager.php
12 replies
FFilament
Created by joao nivaldo on 10/24/2024 in #❓┊help
Change relation manager label
Add this in your relation manager
protected static ?string $title = 'Name for the tab';
protected static ?string $title = 'Name for the tab';
12 replies
FFilament
Created by MK | Programmer on 10/24/2024 in #❓┊help
Install Plugin
Sorry I dont want to set on toes here, but if you keep going down the page they explain better on implementing the plugin. The AppServiceProvide part is only step 1. It just makes filament be able to see the plugin code 🙂 For example if you want the profile avatar, scroll down or see here: https://filamentphp.com/plugins/joaopaulolndev-edit-profile#profile-avatar For additional support see their discord channel in filament's discord: https://discord.com/channels/883083792112300104/1242531847670464562 Hope this helps.
8 replies
FFilament
Created by bambu-in-blue on 10/20/2024 in #❓┊help
Is Filament PHP a Good Fit for a TripAdvisor-Like Project?
I use is in my large apps. IMO: - It makes the filters so much better and user friendly while giving you so much more flexibility. - the ability to reorder columns has been a major requirements in my apps (maybe not so much for a trip advisor) - the filter view manager is AMAZING and would fit in so well with your trip advisor. This would let you add global favorites like "Hot deal" and such dead easy!!!! I am a huge fan and so glad we bought it. WELL worth shelling out for the unlimited projects version as once you use it you will never look back (I am in no way sponsored just a huge fan).
@Kenneth Sese is really active on here (there is a discord channel for it) as well and has helped me a ton while I have been learning it.
5 replies
FFilament
Created by bambu-in-blue on 10/20/2024 in #❓┊help
Is Filament PHP a Good Fit for a TripAdvisor-Like Project?
Depends on how feature rich you want to go. If it is a simple little professional development app where the primary goal is to learn, do it yourself to learn how to do all the bits. It'll be clunky as hell, but you will get MUCH more out of the experience and a greater respect for the Filament team's work. If it is work for a client, Filament makes data tables super easy. Do yourself a favor and buy the lifetime unlimited projects advanced tables plugin, makes it so much better and you can include the cost in the client invoice.
5 replies
FFilament
Created by Mehmet K. on 10/14/2024 in #❓┊help
Is it Possible to Open a Modal within Another Modal in Laravel Filament?
Not sure this fully answers your question, but yes you can have layers of modals. TL;DR using the default functions I have it go from: RELATION MANAGER -> MODAL1 -> MODAL2 -> MODAL1 -> RELATION MANAGER In my case I have: 1. The user clicks a relation manager row that opens MODAL1 so they can edit it. 2. One of the form elements uses createOptionForm() that opens MODAL2 allowing the user to create a new institution record. 3. When The user clicks save on the institution creation model it transitions back to MODAL1 with the institution field automagically selecting the newly created record. 4. The user then clicks save on MODAL1 to save and return back to the relation manager. Hope that makes sense?
3 replies
FFilament
Created by 403gtfo on 9/26/2024 in #❓┊help
Sort one to many TextColumn based on formatted state?
Bah, I cant seem to pull the relation data into a virtual column.
9 replies
FFilament
Created by 403gtfo on 9/26/2024 in #❓┊help
Sort one to many TextColumn based on formatted state?
ooooh that might work. I havent used virtual columns before but I'll give it a crack and check back. Many thanks.
9 replies
FFilament
Created by Ashk on 9/25/2024 in #❓┊help
Navigation group translated label and sort
Just a stab in the dark, but what about trying this?
Filament::registerNavigationGroups([
NavigationGroup::make('nav_1')
->label(__('labels.third_parties'))
->collapsible(),
NavigationGroup::make('nav_2')
->label(__('labels.planning'))
->collapsible(),
NavigationGroup::make'nav_3')
->label(__('labels.commercial'))
->collapsible(),
])
Filament::registerNavigationGroups([
NavigationGroup::make('nav_1')
->label(__('labels.third_parties'))
->collapsible(),
NavigationGroup::make('nav_2')
->label(__('labels.planning'))
->collapsible(),
NavigationGroup::make'nav_3')
->label(__('labels.commercial'))
->collapsible(),
])
I dont have a lot of experience in multi language, but the idea is the make('nav_x) is normalized and should be consistent across languages the labels are still translatable.
6 replies
FFilament
Created by Bruno on 9/24/2024 in #❓┊help
How do I render a livewire modal in my createResource????
And if you want to do something funky in relation to another record you could just add it as a row action
//At the top of the file
use App\Models\ExampleResource
use Filament\Tables\Actions\Action;

// inside your resources $table
->actions([
Action::make('create_example')
->hidden(false) // add logic here to limit access
->form([
TextInput::make('name')
->required()
->rules(['string', 'max:255'])
->unique(ignoreRecord: true)
])
->after(
function ($data, $record) {
// Do stuff here to check and save your Example
// $record is the record you click the action link on
ExampleResource::create([
'name' => $data['name'],
'related_id => $record->id
]);
// Good idea to send a notification here as normal action dont do it automagically.
}
)
])
//At the top of the file
use App\Models\ExampleResource
use Filament\Tables\Actions\Action;

// inside your resources $table
->actions([
Action::make('create_example')
->hidden(false) // add logic here to limit access
->form([
TextInput::make('name')
->required()
->rules(['string', 'max:255'])
->unique(ignoreRecord: true)
])
->after(
function ($data, $record) {
// Do stuff here to check and save your Example
// $record is the record you click the action link on
ExampleResource::create([
'name' => $data['name'],
'related_id => $record->id
]);
// Good idea to send a notification here as normal action dont do it automagically.
}
)
])
8 replies
FFilament
Created by Bruno on 9/24/2024 in #❓┊help
How do I render a livewire modal in my createResource????
Sorry, I may be off base, but are you just trying to create a record via a modal? If so, why not make your life easy by just using a normal header action?
//At the top of the file
use App\Models\ExampleResource
use Filament\Tables\Actions\Action;

// inside your resources $table
->headerActions([
Action::make('create_example')
->hidden(false) // add logic here to limit access
->form([
TextInput::make('name')
->required()
->rules(['string', 'max:255'])
->unique(ignoreRecord: true)
])
->after(
function ($data) {
// Do stuff here to check and save your Example
ExampleResource::create([
'name' => $data['name'],
]);
}
)
])
//At the top of the file
use App\Models\ExampleResource
use Filament\Tables\Actions\Action;

// inside your resources $table
->headerActions([
Action::make('create_example')
->hidden(false) // add logic here to limit access
->form([
TextInput::make('name')
->required()
->rules(['string', 'max:255'])
->unique(ignoreRecord: true)
])
->after(
function ($data) {
// Do stuff here to check and save your Example
ExampleResource::create([
'name' => $data['name'],
]);
}
)
])
8 replies
FFilament
Created by Myster on 9/12/2024 in #❓┊help
Hide table items according to status. No use of filters.
Don't forget to mark the solution 🙂
7 replies
FFilament
Created by 403gtfo on 9/12/2024 in #❓┊help
Is there an easy way to group dashboard widgets into tabs?
I thought this might do it, but I've had no luck https://filamentphp.com/plugins/kenepa-multi-widget
3 replies
FFilament
Created by roy21 on 9/11/2024 in #❓┊help
select filter lazy loading
How I'd do it if you have a zillion statues (which you wouldnt).
SelectFilter::make('status')
->searchable()
->optionsLimit(20),
SelectFilter::make('status')
->searchable()
->optionsLimit(20),
Or if, more realistically, you are pulling Status options from another model:
SelectFilter::make('status')
->relationship('statuses', 'name')
->searchable()
->preload(),
SelectFilter::make('status')
->relationship('statuses', 'name')
->searchable()
->preload(),
Filament is pretty good and performance stuff unless you throw it a raw 1000 options in ->options([]). searchable() is amazing 🙂 Hope this helps?
6 replies
FFilament
Created by asifmushtaq on 9/8/2024 in #❓┊help
Filament vs Nuxt3 for Shipstation like app
Yup I agree with all the peeps, that should be doable 🙂 I had the same reservations at the start as well. I'm not a big fan of frameworks with embedded tailwind (I deeply dislike tailwind in general, but that is a whole other rant) but it has been handy to speed up when I am not trying to do anything special.
12 replies