1. Go to this page and download the library: Download yaroslawww/nova-ad-director 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/ */
yaroslawww / nova-ad-director example snippets
use NovaAdDirector\Facades\NovaAdDirector;
class FrontpageController extends Controller
{
public function __invoke()
{
NovaAdDirector::prepareAds([
'header' => NovaAdDirector::fallbackKey('header', 'frontpage'),
'medium-posts-list' => NovaAdDirector::fallbackKey('medium', 'list', 'frontpage'),
'footer-v2' => NovaAdDirector::fallbackKey('footer', 'frontpage'),
]);
return view('frontpage');
}
}
class AppServiceProvider extends ServiceProvider
{
public function register()
{
\NovaAdDirector\NovaAdDirector::setFallbackKeyConnector('/');
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.