We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For models, I used UUID and got this error when running Nova Actions (only on Nova v5):
[2024-12-15 12:36:39] local.ERROR: Laravel\Nova\Http\Requests\ActionRequest::actionableKey(): Return value must be of type int, string returned {"userId":1,"exception":"[object] (TypeError(code: 0): Laravel\\Nova\\Http\\Requests\\ActionRequest::actionableKey(): Return value must be of type int, string returned at /var/www/html/vendor/laravel/nova/src/Http/Requests/ActionRequest.php:223) [stacktrace] #0 /var/www/html/vendor/laravel/nova/src/Actions/ActionEvent.php(295): Laravel\\Nova\\Http\\Requests\\ActionRequest->actionableKey() #1 [internal function]: Laravel\\Nova\\Actions\\ActionEvent::Laravel\\Nova\\Actions\\{closure}() #2 /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(609): array_map() #3 /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(795): Illuminate\\Support\\Arr::map() #4 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php(375): Illuminate\\Support\\Collection->map() #5 /var/www/html/vendor/laravel/nova/src/Actions/ActionEvent.php(291): Illuminate\\Database\\Eloquent\\Collection->map() #6 /var/www/html/vendor/laravel/nova/src/Actions/DispatchAction.php(192): Laravel\\Nova\\Actions\\ActionEvent::createForModels() #7 [internal function]: Laravel\\Nova\\Actions\\DispatchAction->Laravel\\Nova\\Actions\\{closure}() #8 /var/www/html/vendor/laravel/nova/src/Concerns/InteractsWithActionEvent.php(37): call_user_func() #9 /var/www/html/vendor/laravel/nova/src/Actions/DispatchAction.php(190): Laravel\\Nova\\Nova::usingActionEvent() #10 /var/www/html/vendor/laravel/nova/src/Actions/Transaction.php(26): Laravel\\Nova\\Actions\\DispatchAction->Laravel\\Nova\\Actions\\{closure}() #11 /var/www/html/vendor/laravel/nova/src/Actions/DispatchAction.php(189): Laravel\\Nova\\Actions\\Transaction::run() #12 /var/www/html/vendor/laravel/nova/src/Actions/DispatchAction.php(179): Laravel\\Nova\\Actions\\DispatchAction->dispatchSynchronouslyForCollection() #13 /var/www/html/vendor/laravel/nova/src/Actions/DispatchAction.php(137): Laravel\\Nova\\Actions\\DispatchAction->forModels() #14 /var/www/html/vendor/laravel/nova/src/Http/Requests/ActionRequest.php(94): Laravel\\Nova\\Actions\\DispatchAction->Laravel\\Nova\\Actions\\{closure}() #15 /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(259): Laravel\\Nova\\Http\\Requests\\ActionRequest->Laravel\\Nova\\Http\\Requests\\{closure}() #16 /var/www/html/vendor/laravel/nova/src/Http/Requests/ActionRequest.php(93): Illuminate\\Support\\LazyCollection->each() #17 /var/www/html/vendor/laravel/nova/src/Actions/DispatchAction.php(129): Laravel\\Nova\\Http\\Requests\\ActionRequest->chunks() #18 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/helpers.php(520): Laravel\\Nova\\Actions\\DispatchAction->Laravel\\Nova\\Actions\\{closure}() #19 /var/www/html/vendor/laravel/nova/src/Actions/DispatchAction.php(84): with()
-public function actionableKey($model): int +public function actionableKey($model): int | string { return $this->isPivotAction() ? $model->{$this->pivotRelation()->getForeignPivotKeyName()} : $model->getKey(); }
The text was updated successfully, but these errors were encountered:
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Sorry, something went wrong.
No branches or pull requests
Description:
For models, I used UUID and got this error when running Nova Actions (only on Nova v5):
Solution
The text was updated successfully, but these errors were encountered: