5balloons / laravel-smart-ads

Ads, Banners, Callout Manager and Auto Ad Inserter for Laravel
MIT License
298 stars 32 forks source link

how to restrict admin page to me (the admin) #7

Closed EeKay closed 1 year ago

EeKay commented 1 year ago

hey @5balloons, firstofall: awesome package. Love the clean and sweet features.

I'm wondering how i can properly make it accessible for me as an admin only, without editing the vendor files. Are there any config things i can set?

tushargugnani commented 1 year ago

@EeKay You can create a middleware for the admin users roles and add that to the middleware property in the smart-ads config file 'middleware' => ['web', 'admin'],

EeKay commented 1 year ago

Thanks 🙏🏻, missed that config setting somehow. Already cooked up admin middleware using this medium post.

Working like a charm now. Thanks for this nifty ads package