Filament package for gallery
Install Using Composer
composer require cwsps154/my-gallery
Run
php artisan my-gallery:install
php artisan filament:assets
Add this into your Filament PannelProvider
class panel()
use CWSPS154\UsersRolesPermissions\MyGalleryPlugin;
$panel->plugins([MyGalleryPlugin::make()]);
You can limit the access to the resources
use CWSPS154\UsersRolesPermissions\MyGalleryPlugin;
MyGalleryPlugin::make()
->canViewAny(function () {
return true;
})
->canCreate(function () {
return true;
})
->canEdit(function () {
return true;
})
->canDelete(function () {
return true;
})
If you are using cwsps154/users-roles-permissions
plugin you can use like this
use CWSPS154\MyGallery\Models\Gallery;
use CWSPS154\UsersRolesPermissions\MyGalleryPlugin;
use CWSPS154\UsersRolesPermissions\UsersRolesPermissionsServiceProvider;
MyGalleryPlugin::make()
->canViewAny(UsersRolesPermissionsServiceProvider::HAVE_ACCESS_GATE, Gallery::VIEW_GALLERY)
->canCreate(UsersRolesPermissionsServiceProvider::HAVE_ACCESS_GATE, Gallery::CREATE_GALLERY)
->canEdit(UsersRolesPermissionsServiceProvider::HAVE_ACCESS_GATE, Gallery::EDIT_GALLERY)
->canDelete(UsersRolesPermissionsServiceProvider::HAVE_ACCESS_GATE, Gallery::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,
];
You have to run queue in your local to see the saved gallery
php artisan queue:work
Set the cron in server for the same