dasK_
dasK_
FFilament
Created by dasK_ on 4/5/2024 in #❓┊help
Storing and Retrieving Price
I have just changed all of my tables and functions to use cents instead of dollar values, for the most part now it's working as expected, in Filament however, I'm able to divideBy: 100 in the TextColumn But I'm not able to do the same in the form when it displays the price? I have a function in my product model that converts the dollar value to cents so I can enter in the $4.50 or whatever in the form and it's handled, I've tried to play around with hydration but couldn't work it out.
3 replies
FFilament
Created by dasK_ on 3/18/2024 in #❓┊help
Replacing Login Route with Jetstream
Has anyone had any luck with overriding the /admin/login route with just the /login route from Jetstream? There's no class I could find that I could change the ->login() to in adminPanelProvider, I tried setting the login class in config/filament.php to 'auth' => [ 'pages' => [ 'login' => [\Laravel\Fortify\Http\Controllers\AuthenticatedSessionController::class, 'create'], ], ], but no luck..
5 replies
FFilament
Created by dasK_ on 2/3/2024 in #❓┊help
Filament Page In the Wrong Panel?
I have two panels, Admin and userPanel, all of my pages seem to be working just fine and displaying the panel for the folder/namespace they're in (routes look good too) I have one page in my userPanel that displays the admin panel? I've checked the folder path of the Component and Blade Blade: views/filament/user-panel/pages/top-up.blade.php Component: app/filament/UserPanel/Pages/TopUp.php
namespace App\Filament\UserPanel\Pages;
namespace App\Filament\UserPanel\Pages;
in my provider files admin
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
userPanel
->discoverResources(in: app_path('Filament/UserPanel/Resources'), for: 'App\\Filament\\UserPanel\\Resources')
->discoverPages(in: app_path('Filament/UserPanel/Pages'), for: 'App\\Filament\\UserPanel\\Pages')
->discoverResources(in: app_path('Filament/UserPanel/Resources'), for: 'App\\Filament\\UserPanel\\Resources')
->discoverPages(in: app_path('Filament/UserPanel/Pages'), for: 'App\\Filament\\UserPanel\\Pages')
Can't seem to figure out what's happening here especially when all of the other userPanel pages are fine Generated Route
GET|HEAD userPanel/top-up ......................................................................................................................................................................... filament.userPanel.pages.top-up › App\Filament\UserPanel\Pages\TopUp
GET|HEAD userPanel/top-up ......................................................................................................................................................................... filament.userPanel.pages.top-up › App\Filament\UserPanel\Pages\TopUp
5 replies
FFilament
Created by dasK_ on 1/22/2024 in #❓┊help
Custom Dashboard Not Working
I followed the documentation https://filamentphp.com/docs/3.x/panels/dashboard#customizing-the-dashboard-page on how to create a new dashboard.php file and remove the dashboard class from my PanelProvider, but when I browse to that panel, all I get are 302 redirects constantly until chrome calls it quits with TOO_MANY_REDIRECTS Not sure where to start here..
7 replies
FFilament
Created by dasK_ on 1/19/2024 in #❓┊help
3.2 Exporting CSV
Just upgraded to 3.2 so I can use the export action but hitting a wall when trying to add the ExportAction to getHeaderActions, it seems to work just fine in the table, but it just doesn't work in the header? protected function getHeaderActions(): array { return [ Actions\CreateAction::make(), ImportAction::make() ->importer(ProductImporter::class), ExportAction::make() ->exporter(ProductExporter::class) ]; } Removing ImportAction and leaving just Export still does the same thing. Header actions must be an instance of Filament\Actions\Action, or Filament\Actions\ActionGroup.
6 replies
FFilament
Created by dasK_ on 1/11/2024 in #❓┊help
Multiple IF statements in custom page blade
I'm having issues with multiple IF statements in a custom page blade file, the first IF works fine and doesn't display if the variable is null, but the second $details doesn't? not sure why.. Undefined variable $details (from the @if($details)) line https://gist.github.com/tommmoe/fcaa163097fc32faf9f085087bc58e34
2 replies
FFilament
Created by dasK_ on 1/9/2024 in #❓┊help
Adding an Action to a Form Section?
Have been trying to add an action to form sections but have been unsuccessful, any solutions? protected function getFormSchema(): array { return ([ Section::make('Modify Balance') ->schema([ TextInput::make('bal_subscriberId')->label('Subscriber ID'), TextInput::make('bal_amount')->label('Amount'), Checkbox::make('bal_setBalance')->label('Set Balance'), TextArea::make('bal_description')->label('Description'), ]), Action::make('updateBalance') ->label('Update Balance') ->action('updateBalance'), Section::make('Modify Package Limits') ->schema([ TextInput::make('limit_packageId')->label('Package ID'), TextInput::make('limit_dataBytes')->label('Data Bytes (in bytes)'), TextInput::make('limit_moCalls')->label('MO Calls (in seconds)'), TextInput::make('limit_mtCalls')->label('MT Calls (in seconds)'), TextInput::make('limit_moSms')->label('MO SMS'), TextInput::make('limit_mtSms')->label('MT SMS'), TextArea::make('limit_comment')->label('Comment'), ]), Action::make('modifyPackageLimits') ->label('Modify Package Limits') ->action('modifyPackageLimits')
7 replies
FFilament
Created by dasK_ on 1/7/2024 in #❓┊help
Converting form column to JSON?
Having some issues with filling a column out called productDetails, it's set up to accept json and I've been doing it fine with straight laravel by means of json_encode to write and json_decode to read but in Filament, the only thing I'm able to do is write a string to the productDetails column when I edit a product, creating a product it gives me an Array to string conversion exception, I've tried to use the save function to do this (chatGPT may have this wrong because I'm not getting any logs) Hopefully the code will make more sense, I've also provided an example of what it's meant to look like in the DB. https://gist.github.com/tommmoe/5a33c7057d5081f985cb74fb08934d9d#file-gistfile1-txt
11 replies