🎮Days🕹
🎮Days🕹
FFilament
Created by 🎮Days🕹 on 4/12/2024 in #❓┊help
Testing action error
Solved the situation removing the
$action->halt();
$action->halt();
and adding
$action->cancel();
$action->cancel();
and removing the expectation
->assertActionHalted('import-historical-orders')
->assertActionHalted('import-historical-orders')
for an unknown reason for me the halt method is giving this error
7 replies
FFilament
Created by 🎮Days🕹 on 4/12/2024 in #❓┊help
Testing action error
even doing this
Action::make('import-historical-orders')
->label('Import Historical Orders')
->action(function (Action $action) {
if (Gate::denies('import-historical-orders')) {
$action->failure();
$action->halt();
}

ImportUserHistoricalOrders::dispatch(auth()->user());
$action->success();
})
->successNotification($this->importHistoricalOrdersSuccessNotification())
->failureNotification($this->importHistoricalOrdersFailureNotification());
Action::make('import-historical-orders')
->label('Import Historical Orders')
->action(function (Action $action) {
if (Gate::denies('import-historical-orders')) {
$action->failure();
$action->halt();
}

ImportUserHistoricalOrders::dispatch(auth()->user());
$action->success();
})
->successNotification($this->importHistoricalOrdersSuccessNotification())
->failureNotification($this->importHistoricalOrdersFailureNotification());
removing the before and adding the check on the action i have the same behaviour...it's something to do when i pass the Action parametter to the closure.
7 replies
FFilament
Created by 🎮Days🕹 on 4/12/2024 in #❓┊help
Testing action error
@Dennis Koch thanks for the answer but i have tryied it and i have the same behaviour
7 replies
FFilament
Created by 🎮Days🕹 on 4/12/2024 in #❓┊help
Testing action error
Anyone had this error before?
7 replies
FFilament
Created by Tjiel on 4/12/2024 in #❓┊help
Change default table query to get only the soft deleted records
can you try to add the where with "deleted_at" column NOT NULL or use the onlyTrashed() method on the model
9 replies