thedangler
thedangler
FFilament
Created by thedangler on 5/8/2024 in #❓┊help
After Login in, Dashboard design is all out of wack.
Once logged in, I have to refresh the page to fix the layouts. For example the Profile link top right is cut off and shows the menu out of the screen when it should be hidden. The left nav overlaps the content. Not sure why it doesn't render properly after login, but after a refresh it works fine.
16 replies
FFilament
Created by thedangler on 4/13/2024 in #❓┊help
Pass record to infolist from action
I have a table view action that has a slideover. I'm passing it an info list. I can't seem to pass the current record over. I want to show/hide a button when there is a relationship. How do I pass the current record to the infolist Action::make()->infolist([ entries..... if(record.doesntHave('relationship')->get()) show action button to create the missing relation ship. ])->slideover()
4 replies
FFilament
Created by thedangler on 4/9/2024 in #❓┊help
infolist repeater action get element
inside an action how do I get the element that is in the infolist. The info list is built like $infolist->state(['templates' => $this->templates // which is a collection turned into an array. inside the repeater I'm trying to add a button to assign something to the livewire component but when i do Action::make('action')->action(function(what goes here){ dd($current_item); }) I tried function(Array $item) I tried function(Template $template) its always null. Thanks.
2 replies
FFilament
Created by thedangler on 3/27/2024 in #❓┊help
Table with slideout infolist
Hello I have an infolist in my \Pages\ViewModel. I want to us that infolist inside the table action of my resource. ViewAction::make()->slideover() I don't want to copy my info list in two places and have it in my resource and my \Pages\ViewModel How can I reuse the \Pages\ViewModel $infolist in the resource table slideout.
3 replies
FFilament
Created by thedangler on 3/26/2024 in #❓┊help
How come state breaks infolist
<x-filament-panels::page> {{ $this->infolist }} <x-filament-panels::form wire:submit="save"> {{ $this->form }} <x-filament-panels::form.actions :actions="$this->getCachedFormActions()" :full-width="$this->hasFullWidthFormActions()" /> </x-filament-panels::form> </x-filament-panels::page> When save is clicked the following funciton runs. public function save(): void { try { $data = $this->form->getState(); // this breaks the info list. My infolist has nothing to do with $this-form. $this->handleRecordUpdate($this->record, $data); } catch (Halt $exception) { return; } $this->getSavedNotification()->send(); } How can I save it without getState triggering a reload of my infolist ?
4 replies
FFilament
Created by thedangler on 3/26/2024 in #❓┊help
Using query string parameters to pre load form
Is there a way to get query string parameters in the Resource to pre set some fields. I have to built a project from a subscription. From the subscript resource I click on the subscription and want an action to take me to create the project with the subscription id / info pre populated. Since its a create the model has nothing in it but I can't seem to find an on load, mount or anything that lets me set model attributes before it loads the form.
1 replies
FFilament
Created by thedangler on 3/16/2024 in #❓┊help
Navigation Groups & navigationParentItem not working
Hello, I have a ViewPage and its $navigationGroup is set to 'Group' but the link doesn't show up under it. Even if I try to set a page to a $navigationParentItem it doesn't work. What am I missing?
7 replies
FFilament
Created by thedangler on 3/15/2024 in #❓┊help
Update table from external form.
Very simple, I do not want to load the table until a form and new query is created. But is seems like $table->query() gets called way to early in the cycle. How can I modify the $table->query() when an outside form changes something that effects the query?
9 replies
FFilament
Created by thedangler on 3/14/2024 in #❓┊help
Sushi with 3rd party api request loading table strange issues.
using sushi to get 3rd party api to be placed in a filimant table. When I use sushiModel::query() works, but I need to pass it a param sometimes to adjust the request. However when I use sushiModel->query() causes issues where the table loads before the query is returned. Causing bulk save to not work, popping up modal when submitting my form. Crazy stuff. I use sushiModel->query to add a filter to the api request to re-run the query but it causes some crazy issues. Wondering what exactly changes from static query to method call query and why form->query(model->query()) doesn't work as well as (model::query())
1 replies
FFilament
Created by thedangler on 3/14/2024 in #❓┊help
Very odd behaviour with calling a function but modal opens instead.
Very odd behaviour is happening. I have a form over top of a table. In the form I have a datetime picker to set a date to go fetch data from an API. I have a filter button which applies the data. It loads the data refreshes the table with the data. I also have a table with bulk actions. When I run a bulk action save. The table goes blank and nothing works. If I press the Filter button to set the datatime in the form. It pops up the modal from the bulk save. Always, until I refresh the page. It also never calls my save function, only pops open an modal.
return $form->
schema([
Grid::make()->schema([
DateTimePicker::make('start_date')
//->live()
->label('Filter Start Date')
->native(false)
->closeOnDateSelection(),
Actions::make([
Action::make('setStartDate')
->label('Set Filter')
->action(function () {
$this->applyFilter();
})
])->verticalAlignment(VerticalAlignment::End),

]),
]);
return $form->
schema([
Grid::make()->schema([
DateTimePicker::make('start_date')
//->live()
->label('Filter Start Date')
->native(false)
->closeOnDateSelection(),
Actions::make([
Action::make('setStartDate')
->label('Set Filter')
->action(function () {
$this->applyFilter();
})
])->verticalAlignment(VerticalAlignment::End),

]),
]);
Table
return $table
->query($this->query)
->columns([
TextColumn::make('customerName'),
TextColumn::make('customerEmail'),
TextColumn::make('id')
])
->bulkActions([
BulkAction::make('Save')
->button()
->action(fn(Collection $records) => $this->saveOrder($records)),
]);
return $table
->query($this->query)
->columns([
TextColumn::make('customerName'),
TextColumn::make('customerEmail'),
TextColumn::make('id')
])
->bulkActions([
BulkAction::make('Save')
->button()
->action(fn(Collection $records) => $this->saveOrder($records)),
]);
Two functions
public function saveOrder($records)
{

dd($records); // this never gets run

}
public function saveOrder($records)
{

dd($records); // this never gets run

}
2 replies
FFilament
Created by thedangler on 3/13/2024 in #❓┊help
Livewire function is being called after Table is rendered
I have a action that calls a livewire function to add a filter to a db query. But the function call is being run after filament calls the table() function. So its always not applying my custom filter. Not sure how to tell it to load the table after my filter call.
1 replies
FFilament
Created by thedangler on 2/27/2024 in #❓┊help
navigationParentItem and navigationGroups issues
Hello. For the life of me I can not get custom page to show in a navigationGroup or navigationParentItem. If I add a resource to the group it works but not a custom page. Also, probably somehow related. I can not get navigationParentItem to work at all. If I have a Page and I set a page navigationParentItem = 'Page' It doesn't show, or give any errors. I have the latest Filament Installed. This is driving me insane.
2 replies
FFilament
Created by thedangler on 2/16/2024 in #❓┊help
Side Navigation parent navigation item not working
Hello. Not sure what I'm doing wrong. I create a custom page for a resource using this command php artisan make:filament-page ImportTemplate --resource=TemplateResource --type=custom It created all the files needed. Inside my template resource I have: protected static ?string $navigationLabel = 'Templates'; protected static ?string $navigationGroup = 'Templates'; inside my Resources/TemplateResource/Pages/ImportTemplate.php protected static ?string $navigationLabel = 'Import'; protected static ?string $navigationGroup = 'Templates'; protected static ?string $navigationParentItem = 'Templates'; But my navigation only shows "Templates" as the group then "Templates" as the one link. "Import" is not showing. Wondering if its because I made it like the way I did. I have the latest Filament 3 version.
2 replies
FFilament
Created by thedangler on 1/30/2024 in #❓┊help
Dashboard magic. How is my new custom widget being added to my dashboard?
I created a custom empty dashboard and created a widget. It showed up on my dashboard. How? I did NOT add anything to my new Dashboard.php page. What magic is going on here?
6 replies
FFilament
Created by thedangler on 1/24/2024 in #❓┊help
Show image from url in the edit resource page form
In my form I have all the information I need to change but I want to show the image which the information pertains to. The image is from an outside url. I was able to show the image in the table. Wondering how I can show NOT edit the image from an url in the form. Its so the admins have context to what image they are adding information too.
7 replies