Skip to content

v1.0.0

Latest

Choose a tag to compare

@CWSPS154 CWSPS154 released this 15 Mar 08:04

MyGallery

Filament package for gallery

Installation

Install Using Composer

composer require cwsps154/my-gallery

Run

php artisan my-gallery:install

Usage/Examples

Add this into your Filament PannelProvider class panel()

$panel->plugins([MyGalleryPlugin::make()]);

You can limit the access to the resources

                MyGalleryPlugin::make()
                    ->canViewAny(function () {
                        return true;
                    })
                    ->canCreate(function () {
                        return true;
                    })
                    ->canEdit(function () {
                        return true;
                    })
                    ->canDelete(function () {
                        return true;
                    })

If you are using cwsps154/filament-users-roles-permissions plugin you can use like this

                MyGalleryPlugin::make()
                   ->canViewAny('have-access', 'view-gallery')
                   ->canCreate('have-access', 'create-gallery')
                   ->canEdit('have-access', 'edit-gallery')
                   ->canDelete('have-access', 'delete-gallery'),

You can publish the config file my-gallery.php, by running this command

php artisan vendor:publish --tag=my-gallery-config

which contains these settings

return [
    'settings-page' => \CWSPS154\AppSettings\Page\AppSettings::class,
];

Screenshots

MyGallery

MyGallery

MyGallery