handmadeweb/statamic-laravel-packages

1.0.5 2023-07-10 11:47 UTC

This package is auto-updated.

Last update: 2024-11-10 14:51:33 UTC


README

MIT Licensed

Adds "quick access links" and permissions to Statamic, for popular Laravel (Horizon, Nova, Telescope) packages.

Requirements

  • Statamic 3.1 or higher

Installation

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.

Usage

Permissions

You'll be able to add permissions for each of the installed Laravel Packages in the Statamic control panel.

Permissions

Control Panel

Any package/links that the admin/user has permission to access (and is installed) will appear on the sidebar.

Sidebar

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.