Download the PHP package althinect/filament-spatie-roles-permissions without Composer

On this page you can find all versions of the php package althinect/filament-spatie-roles-permissions. 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 filament-spatie-roles-permissions

Description

Latest Version on Packagist Total Downloads GitHub Actions

This plugin is built on top of Spatie's Permission package.

Provides Resources for Roles and Permissions

Permission and Policy generations

Supports permissions for teams

Updating

After performing a , run

Note that your existing settings will be overriden

If you like our work Don't forget to STAR the project

Installation

You can install the package via composer:

Since the package depends on Spatie's Permission package. You have to publish the migrations by running:

Add the plugin to the AdminPanelProvider

Now you should add any other configurations needed for the Spatie-Permission package.

Note: This will override your existing config file. You can publish the config file of the package with:

You can publish translations with:

Usage

Form

You can add the following to your form method in your UserResource

In addition to the field added to the UserResource. There will be 2 Resources published under Roles and Permissions. You can use these resources manage roles and permissions.

Generate Permissions

You can generate Permissions by running

This will not delete any existing permissions. However, if you want to delete all existing permissions, run

Example:

If you have a Post model, it will generate the following permissions

Generating Policies

To generate policies use the command below. This won't replace any existing policies

Overriding existing Policies

This will override existing policy classes

Role and Permission Policies

Create a RolePolicy and PermissionPolicy if you wish to control the visibility of the resources on the navigation menu. Make sure to add them to the AuthServiceProvider.

Ignoring prompts

You can ignore any prompts by add the flag -Y or --yes-to-all

Recommended only for new projects as it will replace Policy files

Adding a Super Admin

Guard Names

When you use any guard other than web you have to add the guard name to the config/auth.php file. Example: If you use api guard, you should add the following to the guards array

Tenancy

Follow the instructions on Filament Multi-tenancy

Configurations

In the filament-spatie-roles-permissions.php config file, you can customize the permission generation

Security

If you discover any security related issues, please create an issue.

Credits

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.


All versions of filament-spatie-roles-permissions with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2
filament/filament Version ^3.0
illuminate/support Version ^9|^10|^11
spatie/laravel-permission Version ^5.4|^6.0
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 althinect/filament-spatie-roles-permissions contains the following files

Loading the files please wait ....