9 months ago

Class 'App\Nova\' not found

Posted 9 months ago by kgp43

I got this weird problem in Nova and I can't find my error - used a couple of hours trying to find the problem - no success :(

Hope one of you might be able to point me in the right direction.

This is the error I receive:

Class 'App\Nova\' not found {"userId":1,"email":"........","exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Class 'App\Nova\' not found at /home/ec2-user/environment/vendor/laravel/nova/src/Fields/BelongsTo.php:108)

I can add records to the "child-resource" just fine, but I get the error when I tried to Attach the record to the "main-resource" using BelongsTo. I got like 10 other BelongsTo on the same resource, and they all works fine, expect the last one (of cause).

Got this in my "main" model:

public function S()
    return $this->belongsTo('App\S');

Where "S" is the name of the "child-model". Got a "S_id" field in my migration.

I can add records to the "child-resource" just fine.

Got this in my "S" nova resource:

BelongsTo::make('S', 'S')

I'm so confused, specially when the rest works just fine.

Please sign in or create an account to participate in this conversation.