Download the PHP package giatechindo/hypervel-permission without Composer

On this page you can find all versions of the php package giatechindo/hypervel-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 hypervel-permission

Hypervel Permission

Latest Version Total Downloads License

Role-based permission handling for Hypervel framework with ID and UUID support.

Structure

Features

Installation

  1. Install the package via Composer:

  2. Copy the configuration file to your project:

  3. Copy the migration files to your project's migration directory:

  4. (Optional) If you want to use UUID instead of auto-incrementing IDs, add the following to your .env file:

  5. Run the migrations to create the necessary tables:

If you want to start fresh, you can drop all tables and re-run migrations:

Configuration

The configuration file config/permission.php allows you to customize the package behavior. Key options include:

Example configuration:

Usage

Adding the Traits

To enable role and permission management on your models (e.g., User), add the HasRoles and HasPermissions traits:

Creating Roles and Permissions

You can create roles and permissions programmatically:

Assigning Roles and Permissions

Assign roles or permissions to a user:

Checking Roles and Permissions

Check if a user has a specific role or permission:

Using Middleware

You can protect routes using the package's middleware to restrict access based on roles or permissions:

Morph Relationships

The package supports morph relationships, allowing you to assign roles and permissions to any model, not just User. For example:

Testing

The package includes PHPUnit tests. To run the tests:

To generate a test coverage report:

Requirements

For development and testing:

License

This package is open-sourced software licensed under the MIT license.

Credits

This package is inspired by Spatie Laravel Permission and adapted for the Hypervel framework by Giatechindo.


All versions of hypervel-permission with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
hypervel/framework Version ^0.1
ramsey/uuid Version ^4.7
symfony/filesystem Version ^7.2
hyperf/database Version ^3.1
vlucas/phpdotenv Version ^5.6
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 giatechindo/hypervel-permission contains the following files

Loading the files please wait ....