Jr.Pikong
Jr.Pikong
FFilament
Created by Jr.Pikong on 6/15/2024 in #❓┊help
Custom Exporter Colum
No description
12 replies
FFilament
Created by Jr.Pikong on 5/22/2024 in #❓┊help
Export FIle Excel error create big file
Hi All I have proble with export data for large ( 400.000 ) row or more, and error in job :
2024-05-22 11:59:37 Filament\Actions\Exports\Jobs\CreateXlsxFile ... RUNNING
2024-05-22 12:00:37 Filament\Actions\Exports\Jobs\CreateXlsxFile ... 1m FAIL
2024-05-22 11:59:37 Filament\Actions\Exports\Jobs\CreateXlsxFile ... RUNNING
2024-05-22 12:00:37 Filament\Actions\Exports\Jobs\CreateXlsxFile ... 1m FAIL
I check resource ( RAM,CPU ) is OK and I don't have Log what the problem . and in table failed_jobs I get error :
Illuminate\Queue\TimeoutExceededException: Filament\Actions\Exports\Jobs\CreateXlsxFile has timed out. in /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/TimeoutExceededException.php:15
Stack trace:
#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(796): Illuminate\Queue\TimeoutExceededException::forJob()
#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(217): Illuminate\Queue\Worker->timeoutExceededException()
#2 /var/www/html/vendor/openspout/openspout/src/Common/Helper/Escaper/XLSX.php(136): Illuminate\Queue\Worker->Illuminate\Queue\{closure}()
#3 /var/www/html/vendor/openspout/openspout/src/Common/Helper/Escaper/XLSX.php(35): OpenSpout\Common\Helper\Escaper\XLSX->escapeControlCharacters()
Illuminate\Queue\TimeoutExceededException: Filament\Actions\Exports\Jobs\CreateXlsxFile has timed out. in /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/TimeoutExceededException.php:15
Stack trace:
#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(796): Illuminate\Queue\TimeoutExceededException::forJob()
#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(217): Illuminate\Queue\Worker->timeoutExceededException()
#2 /var/www/html/vendor/openspout/openspout/src/Common/Helper/Escaper/XLSX.php(136): Illuminate\Queue\Worker->Illuminate\Queue\{closure}()
#3 /var/www/html/vendor/openspout/openspout/src/Common/Helper/Escaper/XLSX.php(35): OpenSpout\Common\Helper\Escaper\XLSX->escapeControlCharacters()
any one have a idea ?
4 replies
FFilament
Created by Jr.Pikong on 3/27/2024 in #❓┊help
importer S3 Get Error
Hi all , I have problem with importer and disk use S3, after I upload .csv faile I get error
[2024-03-27 15:04:07] local.ERROR: Error executing "GetObject" on "https://BUCKETNAME.s3.ap-southeast-3.amazonaws.com//var/www/html/storage/app/livewire-tmp/z7pJT3wUCoPBCXnvTptbHmAQhWPFWn-metaYjJiLXRyYW5zYWN0aW9uLWl0ZW0taW1wb3J0ZXItZXhhbXBsZSAoMSkuY3N2-.csv"; AWS HTTP error: Client error: `GET https://BUCKETNAME.s3.ap-southeast-3.amazonaws.com//var/www/html/storage/app/livewire-tmp/z7pJT3wUCoPBCXnvTptbHmAQhWPFWn-metaYjJiLXRyYW5zYWN0aW9uLWl0ZW0taW1wb3J0ZXItZXhhbXBsZSAoMSkuY3N2-.csv` resulted in a `404 Not Found` response NotFound (client): 404 Not Found (Request-ID: 6F9S5C37KABFQHA1) - <?xml version="1.0" encoding="UTF-8"?>
[2024-03-27 15:04:07] local.ERROR: Error executing "GetObject" on "https://BUCKETNAME.s3.ap-southeast-3.amazonaws.com//var/www/html/storage/app/livewire-tmp/z7pJT3wUCoPBCXnvTptbHmAQhWPFWn-metaYjJiLXRyYW5zYWN0aW9uLWl0ZW0taW1wb3J0ZXItZXhhbXBsZSAoMSkuY3N2-.csv"; AWS HTTP error: Client error: `GET https://BUCKETNAME.s3.ap-southeast-3.amazonaws.com//var/www/html/storage/app/livewire-tmp/z7pJT3wUCoPBCXnvTptbHmAQhWPFWn-metaYjJiLXRyYW5zYWN0aW9uLWl0ZW0taW1wb3J0ZXItZXhhbXBsZSAoMSkuY3N2-.csv` resulted in a `404 Not Found` response NotFound (client): 404 Not Found (Request-ID: 6F9S5C37KABFQHA1) - <?xml version="1.0" encoding="UTF-8"?>
14 replies
FFilament
Created by Jr.Pikong on 2/27/2024 in #❓┊help
how to register cluster in a plugin ?
If we develop a plugin and want to register a resource we can use $page->resource([XXX:class]) but how to register a Cluster ?
4 replies
FFilament
Created by Jr.Pikong on 2/27/2024 in #❓┊help
Add Resource in Plugin with cluster Not Show the navigation
Hi all, I made a plugin , and registered the resources in SmartExpensePlugin with public function register(Panel $panel): void { $panel->resources([ExpenseBudgetResource::class]); } and in my ExpenseBudgetResource I implement to cluster protected static ?string $cluster = ExpenseSystemSetup::class; but in the navigation doesn't show the resource, and if I remove protected static ? string $cluster = ExpenseSystemSetup::class; the navigation ExpenseBudget show what is missing from my configuration?
3 replies
FFilament
Created by Jr.Pikong on 2/25/2024 in #❓┊help
make:resource
Hi all anyone implemented filament with laravel tenancy : https://tenancyforlaravel.com/ ? I want to make filament resource with artisan tenants:run make:filament-resource Ga/Warehouse --tenants=perkasa --option="--generate" but get error : Too many arguments to "tenants:run" command, expected arguments "commandname". actually I can generate resouce with standart command from filament artisan make:filament-resurce Ga/Warehouse --generate the resource created but not with the generate field ( --generate) because not found the database for the tenant
3 replies
FFilament
Created by Jr.Pikong on 2/20/2024 in #❓┊help
Action Modal little slow in record table
Hi All I have a record with Filament\Tables\Actions\Action, if I click is a little slow before showing the modal, but if in viewPage is fast $table->actions([ Tables\Actions\ViewAction::make(), Action::make('Update') ->requiresConfirmation() ->disabled(fn(): bool => !auth()->user()->can('update_purchase')) ->icon('heroicon-m-pencil-square') ->form([ Select::make('status') ->options([ 4 => 'Success', 2 => 'General Error', 47 => 'Suspect', 3 => 'Refund' ]) ->required(), TextInput::make('sn') ->required() ->default(fn(PurchaseItem $record): string|null => $record->sn) ])->action(fn(PurchaseItem $record, array $data, Action $action) => self::updateStatus($record, $data, $action)) ]) and the method updateStatus public static function updateStatus(PurchaseItem $record, array $data, Action $action): void { (new PurchaseUpdateStatusService())->updateStatus($record, $data, $action); } I added a view to show that and is run in production
2 replies
FFilament
Created by Jr.Pikong on 2/20/2024 in #❓┊help
Optimizing Table Load Speed
nova
45 replies
FFilament
Created by Jr.Pikong on 1/25/2024 in #❓┊help
Sign out 405 in Production
Hi all, I have a problem with logging out in production. I don't know what's wrong with my code because it works perfectly locally (using Sail). In production, when I click the 'Sign Out' menu, I get a 405 error. It seems that the link is using the GET method. this is my config auth.php <?php return [ 'defaults' => [ 'guard' => 'agent', 'passwords' => 'agents', ], 'guards' => [ 'agent' => [ 'driver' => 'session', 'provider' => 'agents', ], ], 'providers' => [ 'agents' => [ 'driver' => 'eloquent', 'model' => App\Models\Agent::class, ], // 'users' => [ // 'driver' => 'database', // 'table' => 'users', // ], ], 'passwords' => [ 'users' => [ 'provider' => 'users', 'table' => 'password_reset_tokens', 'expire' => 60, 'throttle' => 60, ], ], 'password_timeout' => 10800, ];
4 replies
FFilament
Created by Jr.Pikong on 1/19/2024 in #❓┊help
Export with custom guard
Hi All, have an app with V3 filament, for auth I use custom guard with the agents table sofar auth works fine, but I have a problem implementing export. This problem is because the export table has a relationship with the users table with user_id whereas I use the agents table. so if I run export I get errors exports, CONSTRAINT exports_user_id_foreign FOREIGN KEY ('user_id') REFERENCES 'users' ('id') ON DELETE CASCADE and other problems I use many panels and of course, I use guard with user and implement export, so how to use export in multiple guards?
7 replies
FFilament
Created by Jr.Pikong on 11/29/2023 in #❓┊help
TextInput default() not work wit get()
I have two fields and this related. Forms\Components\Select::make('branch_id') ->label('Branch') ->live() ->relationship('branch', 'name', fn($query, $get) => $query->where('cluster_id', $get('cluster_id'))) ->afterStateUpdated(function (Set $set, ?string $state) { $set('idBranch', $state); // Add logging or debugging statements here Log::info("idBranch updated: $state"); }) ->searchable() ->preload(), Forms\Components\TextInput::make('code') ->required() ->readOnly() ->live() ->default(function (Get $get) { $branchName = Branch::query()->find($get('idBranch')); Log::info("idBranch updated: ".$get('idBranch')); $prefix = 'BPL' . $get('idBranch'); return GenerateCode::create(BudgetPlanner::class, 'code', $prefix); }) ->maxLength(255), but $get('idBranch') or $get('id_branch') not calling after branch_id is selected.
3 replies
FFilament
Created by Jr.Pikong on 10/23/2023 in #❓┊help
default value in custom page
Hi , how to add default value for textInput in custom page ? I try to use afterStateHydrated still not working.
class AddBudgetPlanner extends Page implements HasForms
{
use InteractsWithForms, InteractsWithActions, HasPageSidebar;

protected static string $resource = BranchResource::class;
protected static string $view = 'filament.resources.branch-resource.pages.create-budget-planner';
public Branch $record;
protected static ?string $model = Branch::class;

public function getBreadcrumb(): ?string
{
return __('Manage Branch Budget Planner');
}

public function form(Form $form): Form
{
return $form->schema([
TextInput::make('code')->afterStateHydrated(fn(TextInput $component) => $component->state('heloss'))
]);
}
class AddBudgetPlanner extends Page implements HasForms
{
use InteractsWithForms, InteractsWithActions, HasPageSidebar;

protected static string $resource = BranchResource::class;
protected static string $view = 'filament.resources.branch-resource.pages.create-budget-planner';
public Branch $record;
protected static ?string $model = Branch::class;

public function getBreadcrumb(): ?string
{
return __('Manage Branch Budget Planner');
}

public function form(Form $form): Form
{
return $form->schema([
TextInput::make('code')->afterStateHydrated(fn(TextInput $component) => $component->state('heloss'))
]);
}
32 replies