Download the PHP package mkinyua53/authorization without Composer
On this page you can find all versions of the php package mkinyua53/authorization. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download mkinyua53/authorization
More information about mkinyua53/authorization
Files in mkinyua53/authorization
Download mkinyua53/authorization
More information about mkinyua53/authorization
Files in mkinyua53/authorization
Vendor mkinyua53
Package authorization
Short Description A package to add functionality to larapacks/authorization package
License MIT
Package authorization
Short Description A package to add functionality to larapacks/authorization package
License MIT
Please rate this library. Is it a good library?
Informations about the package authorization
Mkinyua53 Authorization
This package returns all the possible routes of larapacks\authorization
package.
You need to have configured that package first in your laravel project.
Installation
Use composer
Insert the service provider in config\app.php providers array.
Usage
Add the relationships functions in
\App\User
\App\Role
\App\Permission
Insert the routes declaration in a service provider register function
The following routes will be added
NOTE
- This package is optimized to be used in an api, no views are provided
Summary
Route | Method | Parameters | Return | Extra |
---|---|---|---|---|
roles | GET | null | Collection $roles |
|
roles | POST | Request $request |
App\Role $role |
|
roles/{role} | GET | $roleId | App\Role $role |
Returns users and permissions relationships as Array |
roles/{role} | PUT / PATCH | Request $request, $roleId |
App\Role $role |
|
roles/{role} | DELETE | $roleId | App\Role $role |
|
~ | ~ | ~ | ~ | ~ |
permissions | GET | null | Collection $permissions |
|
permissions | POST | Request $request |
App\Permission $permission |
|
permissions/{permission} | GET | $permissionId | App\Permission $permission |
Returns users and roles relationships as Array |
permissions/{permission} | PUT / PATCH | Request $request, $permissionId |
App\Permission $permission |
|
permissions/{permission} | DELETE | $permissionId | App\Permission $permission |
|
~ | ~ | ~ | ~ | ~ |
roles/{role}/users/{user}/attach | POST | $roleId, $userId | string 'User granted the role' |
Grant the role to the user |
roles/{role}/permissions/{permission}/attach | POST | $roleId, $permissionId | string 'Permission granted the role' |
Grants the role to the permission |
roles/{role}/users/{user}/detach | POST | $roleId, $userId | string 'User detached of role' |
Detaches the role from the user |
roles/{role}/permissions/{permission}/detach | POST | $roleId, $permissionId | string 'Permission detached from role' |
Detaches the role from the permission |
roles/users/{user}/detach | POST | $userId | string 'User detached all role' |
Detaches all roles from a user |
roles/permissions/{permission}/detach | POST | $permissionId | string 'Permission detached of all role' |
Detaches all roles from permission |
~ | ~ | ~ | ~ | ~ |
permissions/{permission}/users/{user}/attach | POST | $permissionId, $userId | string 'Permission granted to user' |
Grants the permission to the user |
permissions/{permission}/users/{user}/detach | POST | $permissionId, $userId | string 'User detached of the permission' |
Detach permission from user |
permissions/users/{user}/detach | POST | $userId | string 'User detached of all permission' |
Detach all permission from user |
All versions of authorization with dependencies
PHP Build Version
Package Version
Requires
larapacks/authorization Version
^2.3
The package mkinyua53/authorization contains the following files
Loading the files please wait ....