NullPointer
NullPointer
FFilament
Created by NullPointer on 1/31/2025 in #❓┊help
How to stop the importing process
How to stop the importing process if a subscription plan limit is reached? I try it like so, but it is not working. I mean it does not import records but always shows a Notification with import started. This should not be the case.
ImportAction::make()
->importer(ClientImporter::class)
->beforeFormValidated(function () {
$subscription = app(Subscription::class, ['user' => auth()->user()]);
if ($subscription->hasReachedLimitForResource('client', 'import')) {
Notification::make()
->title('You have reached the limit for importing clients.')
->danger()
->send();
return;
}
})
ImportAction::make()
->importer(ClientImporter::class)
->beforeFormValidated(function () {
$subscription = app(Subscription::class, ['user' => auth()->user()]);
if ($subscription->hasReachedLimitForResource('client', 'import')) {
Notification::make()
->title('You have reached the limit for importing clients.')
->danger()
->send();
return;
}
})
2 replies
FFilament
Created by NullPointer on 1/15/2025 in #❓┊help
Composer update causes "Malformed UTF-8 characters, possibly incorrectly encoded"
Hi everyone, After updating my app using Composer, I’ve encountered an issue when submitting forms. Every time I submit, I receive the following error: “Malformed UTF-8 characters, possibly incorrectly encoded.” I’ve tried several solutions, but nothing seems to resolve the problem. Thank you in advance!
6 replies