Closed tobya closed 1 year ago
As the error suggests (even though not super clear 😅 ) you need to add a @relatedModel
docblock to the relation method.
Something like this:
/**
* @relatedModel \App\Models\User
*/
public function myRelation()
{
return $this->belongsTo($customClass);
}
I am unsure why this error prevents the page from loading.
OS: win32 Invoker Version: 2.9.0 Laravel Version: 8.83.16 Local project: unknown PHP Binary: C:\Development\php\php81\php.exe Route: /project/index?class=App%5CModels%5COrder&time=1664022268015&project=remote-sjmNHnbJeJs26eY1126i5V
Error: