You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
SulaimanBello
changed the title
Command php artisan resource-file:create not working with --relations parameters
Command php artisan resource-file:create not working with --relations parameters
Oct 14, 2021
SulaimanBello
changed the title
Command php artisan resource-file:create not working with --relations parameters
Command php artisan resource-file:create not working with --relations parameters
Oct 14, 2021
Environment:
Description:
Following the documentation, this command
php artisan resource-file:create
could not work with--relations
parameters.Steps:
php artisan resource-file:append Post --fields="name:another" --relations="name:comments;type:hasMany;field:title;params:App\Models\Comment|post_id|id"
Running the cammand above would generate
ErrorException
Undefined offset: 1
The culprit seems to be the line below
A quick dirty fix was changing the line to:
list($key, $value) = Str::split(':', $part);
The text was updated successfully, but these errors were encountered: