1. Go to this page and download the library: Download pavloniym/nova-iframe-page 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/ */
pavloniym / nova-iframe-page example snippets
use Pavloniym\NovaIframePage\NovaIframePage;
class NovaServiceProvider extends NovaApplicationServiceProvider
{
// ...
/**
* Register the Nova routes.
*
* @return void
*/
protected function routes()
{
// ...
// default nova routes
NovaIframePage::make()
->setSrc('https://mycoolsite.com')
->setPath('custom-iframe-path')
->register();
}
// ...
}
use Pavloniym\NovaIframePage\NovaIframePage;
class NovaServiceProvider extends NovaApplicationServiceProvider
{
// ...
/**
* Get the tools that should be listed in the Nova sidebar.
*
* @return array
*/
public function tools()
{
return [
NovaIframePage::make()
->setIcon('server')
->setName('My Cool Site')
->setPath('custom-iframe-path'),
];
}
// ...
}