1. Go to this page and download the library: Download cwsps154/my-gallery library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cwsps154 / my-gallery example snippets
use CWSPS154\UsersRolesPermissions\MyGalleryPlugin;
$panel->plugins([MyGalleryPlugin::make()]);
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),