[Bug] Too few arguments to function Illuminate\Database\Eloquent\Relations\HasOneOrMany
See original GitHub issueBug report
What I did
Acessed create page from a crud having relation to another object
What I expected to happen
Open the page
What happened
Get this error: Too few arguments to function Illuminate\Database\Eloquent\Relations\HasOneOrMany::__construct(), 0 passed in D:\xampp\htdocs\backpack\vendor\backpack\crud\src\app\Library\CrudPanel\Traits\Relationships.php on line 345 and exactly 4 expected
What I’ve already tried to fix it
Input an attribute named entity in my array
Is it a bug in the latest version of Backpack?
yes, backpack/crud 5.0.3 and backpack/pro 1.0.7
After I run composer update backpack/crud
the bug… is it still there?
yes
Backpack, Laravel, PHP, DB version
backpack/crud 5.0.3 backpack/pro 1.0.7 Laravel 9.0.2 PHP 8.0.11 DB: Postgresql
When I run php artisan backpack:version
the output is:
PHP 8.0.11 (cli) (built: Sep 21 2021 18:26:06) ( ZTS Visual C++ 2019 x64 )
Copyright © The PHP Group
Zend Engine v4.0.11, Copyright © Zend Technologies
LARAVEL VERSION:
v9.0.2@4c7cd8c4e95d161c0c6ada6efa0a5af4d0d487c9
BACKPACK VERSION:
5.0.3@c14eaca0d10c3a37280786d65cebf735235850d6
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top GitHub Comments
thanks, problem solved 😃
Thanks, confirmed this works after running
composer update