PHP code example of nauticsoft / nova-view

1. Go to this page and download the library: Download nauticsoft/nova-view library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nauticsoft / nova-view example snippets


use Nauticsoft\NovaView\NovaView;

/**
 * Get the tools that should be listed in the Nova sidebar.
 *
 * @return array
 */
public function tools()
{
    return [
        NovaView::make(),
    ];
}

use Nauticsoft\NovaView\NovaView;

/**
 * Get the tools that should be listed in the Nova sidebar.
 *
 * @return array
 */
public function tools()
{
    return [
        NovaView::make()->withoutMenu(),
    ];
}

namespace App\Nova\Views;

use Nauticsoft\NovaView\Contracts\NovaView;

class TestNovaView implements NovaView
{
    public function getTitle(): string
    {
        return 'Test view';
    }

    public function getView(): string
    {
        return 'nova.test';
    }

    public function getSlug(): string
    {
        return 'test';
    }
}

// config/nova.php

'views' => [
    App\Nova\Views\TestNovaView::class,
],