1. Go to this page and download the library: Download usamamuneerchaudhary/adment 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/ */
usamamuneerchaudhary / adment example snippets
use Usamamuneerchaudhary\Adment\AdmentPlugin;
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugin(AdmentPlugin::make());
// ->plugin(AdmentPlugin::make()->settingsPage(false)) to hide settings
// ->plugin(AdmentPlugin::make()->analyticsPage(false)) to hide analytics
}
use Usamamuneerchaudhary\Adment\Facades\Ads;
Ads::registerLocation('footer', 'Footer')
->registerLocation('post-content', 'Below post content');
Ads::display('sidebar'); // string of HTML
Ads::displayAds('HOMEPAGEBNNR'); // ?string
Ads::locationHasAds('sidebar'); // bool — for conditional layouts
Ads::getAd('HOMEPAGEBNNR'); // ?Ad model