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
In getClassNameForRelationships methods, usage of class_basename allows to get the class without the FQN, causing an issue when multiple classes are called with the same base name in the project.
>\App\Models\ProductPack::first()->containedProducts;
[!] Aliasing 'Product' to 'App\Http\Resources\Product'for this Tinker session.
ArgumentCountError Too few arguments to functionIlluminate\Http\Resources\Json\JsonResource::__construct(), 0 passed in vendor/tightenco/parental/src/HasParent.php on line 78 and exactly 1 expected.
The text was updated successfully, but these errors were encountered:
In
getClassNameForRelationships
methods, usage ofclass_basename
allows to get the class without the FQN, causing an issue when multiple classes are called with the same base name in the project.Example :
App\Models\Product
<- ParentApp\Models\ProductPack
<- ChildApp\Models\ProductSimple
<- ChildApp\Http\Resources\Product
Testing in tinker will output this error :
The text was updated successfully, but these errors were encountered: