ninjaportal/portal is a Laravel package for a laravel like apigee devportal.
It currently has 0 GitHub stars and 14 downloads on Packagist (latest version 0.1.3.1).
Install it with composer require ninjaportal/portal.
Discover more Laravel packages by ninjaportal
or browse all Laravel packages to compare alternatives.
Last updated
Core domain package for NinjaPortal.
It provides:
ninjaportal/portal intentionally keeps API authentication concerns out of the core
package. JWT-aware user/admin models are provided by ninjaportal/portal-api.
From the Laravel app (backend):
php artisan portal:install
Safer install options:
php artisan portal:install --force-provider-overwrite
php artisan portal:install --delete-default-users-migration
Notes:
App\Providers\NinjaPortalServiceProvider unless you pass --force-provider-overwrite.--delete-default-users-migration.php artisan portal:seed --all
php artisan portal:seed --settings --rbac
php artisan portal:seed --demo
The package now standardizes model-policy permissions using:
portal.{model}.{ability}
Examples:
portal.user.view_anyportal.user.updateportal.api_product.createportal.setting_group.deleteRoute/API level permissions remain:
portal.admin.accessportal.rbac.manageportal.admins.manageportal.activities.viewThe RbacSeeder seeds both route-level permissions and model-policy permissions.
Use this pattern:
BaseService...ServiceInterfaceCrudOperationsTraitExamples:
src/Services/UserService.phpsrc/Services/ApiProductService.phpsrc/Services/SettingService.phpUse this pattern:
ServiceInterface)ReportsServiceFailuresTraitExamples:
src/Services/UserAppService.phpsrc/Services/UserAppCredentialService.phpPreferred event naming is:
{DomainThing}{Action}Event
Examples:
UserCreatedEventApiProductUpdatedEventUserAppCredentialCreatedEventPublishing policy:
...Event is the canonical and only supported class nameFireEventsTrait dispatches the ...Event class only.
Credential-related events may include credentialKey when the operation targets a
specific credential (approve/revoke/delete/product mutations). Generated-key events
include it when the upstream Apigee client returns the created key.
The package publishes an app provider stub:
App\Providers\NinjaPortalServiceProviderUse it to wire project-specific listeners/observers (for example syncing users to Apigee on create/update).
After installing package dev dependencies:
composer install
composer test
composer analyse
composer format
restore() is only supported for models using Eloquent SoftDeletes; other models
will throw a clear exception if restore() is called.