Download the PHP package nijwel/user-roles without Composer

On this page you can find all versions of the php package nijwel/user-roles. 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 user-roles

Nijwel User Roles

nijwel/user-roles is a Laravel package for managing user roles and permissions with ease. It provides a simple interface to manage user roles and permissions, integrating seamlessly with Laravel's authentication system.

You can visit github repository - https://github.com/nijwel/user_roles.git

Features

Installation

Via Composer

Install the package via Composer:

Migration

Publish Configuration (If Applicable)

If the package includes configuration files, publish them using:

Note: If you receive the message "No publishable resources for tag []", it indicates there are no additional configuration files to publish. Please refer to the package documentation for further instructions.

Configuration

Add the service provider to the providers array in your config/app.php file:

Usage

Creating Roles You can create roles using the Role model provided by the package:

Now you can insert the side-ber menu name or top-bar menu name into permissions table

Example : student , subcategories , products , accounts etc

Role name is input and permissions is checkbox array. you can handle from same form and post request

#Your Controller

use Nijwel\UserRoles\Services\UserRoleService;

protected $UserRoleService;

public function __construct(UserRoleService $UserRoleService)
{
    $this->UserRoleService = $UserRoleService;
}

#Get all role

UserRoleService::getAllRole();

#Get singe role

UserRoleService::getRole($id);

#Store role

UserRoleService::createRole($request->all());

#Update role

UserRoleService::updateRole($request->all(), $id);

#delete role

UserRoleService::destroyRole($id);

Get all permission list.

NB: permission means your side bar name

UserRoleService::getAllPermission();

#Get single permission

UserRoleService::getPermission($id);

#Store permissions

UserRoleService::createPermission($request->all());

#Update permissions

UserRoleService::updatePermission($request->all(), $id);

#delete permissions

UserRoleService::destroyPermission($id);

#Get All role with permission

NB: You can handle with one form

UserRoleService::getAllRoleWithPermission();

#Get single role with permission

UserRoleService::getRoleWithPermission($id);

#Store role with permission [ This is the array data for role and permission ]

//Permissions is array value ;
UserRoleService::createRoleWithPermission($request->all());

#Update role with permission [Array]

//Permissions is array value ;
UserRoleService::updateRoleWithPermission($request->all(), $id);

#delete role with permission

UserRoleService::destroyRoleWithPermission($id);

For blade file

Use the Middleware in a Laravel Application

Once the package is installed in a Laravel application, you can use the middleware in routes or controllers.

Using Middleware in Routes:

You can apply the middleware to routes like this:

Using Middleware in Controllers:

You can also apply the middleware in a controller:


All versions of user-roles with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
guzzlehttp/guzzle Version ^7.2
laravel/framework Version ^10.10
laravel/sanctum Version ^3.3
laravel/tinker Version ^2.8
laravel/ui Version ^4.2
pusher/pusher-php-server Version ^7.2
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 nijwel/user-roles contains the following files

Loading the files please wait ....