vesst's avatar
Level 2

Nova Custom Card object Object - not working/showing up

<overview card="[object Object]" lens="" class=""></overview>

The nova-component shows up locally fine but going to a dev environment it doesn't show up. Ran composer install. Nothing in the logs.

NovaServiceProvider.php

if(Auth()->user()->hasRole('Admin') || Auth()->user()->hasRole('Coordinator') ) {

            return [
                // new Help,
                new ActiveInactiveMembers,
                new TotalDocuments,
                new TotalActiveRfs,
            ];
        } else {
            return [
                (new Overview)->currentUser(),
            ];
        }

Overview.php

public function component()
    {
        return 'overview';
    }

    public function currentUser()
    {
        return $this->withMeta(['currentUser' => Auth()->user()->id]);
    }

Again it shows fine in local. What step am i missing to get it working in the dev environment?

0 likes
2 replies
vesst's avatar
Level 2

Fixed it by

php artisan optimize:clear
rm -rf ./vendor
composer install
esti@boaideas.com's avatar

@vesst i did it and its not working, i do see the card details at the xhr response in the cards file. but in the vue i cannot access card. i get it as a [object object] string value in the console, do you have any idea why?

Please or to participate in this conversation.