Adds "quick access links" and permissions to Statamic, for popular Laravel (Horizon, Nova, Telescope) packages.
- Statamic 3.1 or higher
You can install the package via composer:
composer require handmadeweb/statamic-laravel-packages
Then you can assign permissions via Statamic which will be usable in the form of can
/ cant
, access laravel telescope
, access laravel horizon
or access laravel nova
Then just update the service provider for your chosen package, for example with Telescope we might use the following.
\App\Providers\TelescopeServiceProvider
/**
* Register the Telescope gate.
*
* This gate determines who can access Telescope in non-local environments.
*
* @return void
*/
protected function gate()
{
Gate::define('viewTelescope', function ($user) {
return $user->can('access laravel telescope');
});
}
And now you will be able to manage access via Statamic.
You'll be able to add permissions for each of the installed Laravel Packages
in the Statamic control panel.
Any package/links that the admin/user has permission to access (and is installed) will appear on the sidebar.
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.