Download the PHP package timedoor/laravel-route-permission without Composer

On this page you can find all versions of the php package timedoor/laravel-route-permission. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-route-permission

Laravel Route Permission

Extended from spatie/laravel-permission version 5, this package help developer authorize user permission based on URI and request method.

Installation

Use the package manager composer to install this package.

Publish the package in your project with:

Then run the database migration.

Usage

You can use provided route middleware alias from this package named route-permission that can be configured from config/permission.php, for example:

Or if you using a guard you can use it like this, for example an api guard.

Your user must be logged in if you use this middleware, this middleware will automatically match logged-in user permission with the current route URI.

For creating permission for REST API you can use provided permission model by this package, for example:

When saving the permission this package will trim all whitespace and / character from provided uri.

You can use * as a wildcard character for route permissions.

Make sure you include the traits from Timedoor\RoutePermission for role and permission models to use the extended features for the route.

For the uri value use string provided from one of the below codes for accurate reference.

In the database, the permission name will be stored as route>>api/user>>* (if the second parameter isn't provided it will be stored as a wildcard *) or route>>api/user/{parameter}>>POST (all route parameters will be converted to parameter or you can change the behaviour from config/permission.php)

You can access it with default spatie/laravel-permission utility like:

Or using provided helper function to generate formatted permission name.

For manipulating route permission here's the list of other extended methods:

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT


All versions of laravel-route-permission with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^8.0|^8.1
spatie/laravel-permission Version ^5.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package timedoor/laravel-route-permission contains the following files

Loading the files please wait ....