Jr.Pikong
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 :
I check resource ( RAM,CPU ) is OK
and I don't have Log what the problem .
and in table failed_jobs I get error :
any one have a idea ?
4 replies
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
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 tenant3 replies
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 production2 replies
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
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
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