Download the PHP package solution-forest/filament-access-management without Composer

On this page you can find all versions of the php package solution-forest/filament-access-management. 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-access-management

Solution Forest

Filament Access Management

Role & permission management for Filament, powered by spatie/laravel-permission — with a path-based access gate, a database-driven navigation menu, and a one-command super-admin setup.

Latest Version on Packagist Tests Total Downloads


✨ Features

📋 Compatibility

Plugin version Filament version
1.x 2.x
2.x 3.x
3.x 4.x / 5.x

[!NOTE] This plugin depends on guava/filament-icon-picker for the icon selection UI. If you encounter any errors related to the icon picker, consult the icon picker documentation.

Known issue with Filament v5: see GuavaCZ/filament-icon-picker#70.

📦 Installation

  1. Ensure you have already installed a Filament panel.
  2. Install the package via Composer:

  3. Add the necessary trait to your User model:

    Panel access (production): the trait provides the permission helpers but does not implement Filament's FilamentUser contract. Outside the local environment Filament denies panel access (HTTP 403) to any user whose model doesn't implement it, so also add canAccessPanel() — see the Upgrade Guide.

  4. Clear your config cache:

  5. Register the plugin in your panel provider (required from v2.x onwards):

  6. Run the installer:

    If you don't already have a user named admin, this creates a Super Admin User:

    Field Value
    Name admin
    Email admin@("slug" pattern from config("app.name")).com
    Password admin

    You can also create one anytime with:

  7. If you are upgrading data from before v2.2.0, run:

🗂️ Publish Configs, Views, Translations and Migrations

Then run the migrations:

🔼 Upgrade Guide

[!CAUTION]

⚠️ BACK UP YOUR DATABASE FIRST ⚠️

Upgrading runs migrations and the filament-access-management:upgrade command rewrites menu data in place. Always take a full backup of your database (and code) before you start. Test the upgrade on a staging copy first, and never run it against production without a verified, restorable backup. This operation can modify or delete rows and is not automatically reversible.

This plugin follows the Filament major it targets. Upgrade the plugin together with Filament in a single Composer command, because the 2.x line pins filament/filament: ^3.0 and will block a Filament v4/v5 install. The steps below were verified against a real Laravel app upgraded in place (same database file) from Filament v3 → v4 → v5.

Requirements on your User model (all versions)

Add the FilamentUser contract and canAccessPanel() so the panel isn't 403'd outside local:

Filament v3 (plugin 2.x) → Filament v4 (plugin 3.x)

  1. Move Filament and the plugin together:

    This also moves solution-forest/filament-tree (2 → 3) and guava/filament-icon-picker (2 → 3).

  2. Follow the official Filament v3 → v4 upgrade guide for your own app code (namespace changes, Form → Schema, action namespaces).
  3. Run migrations (no new column is added — is_filament_panel already ships in the upgrade_menu_table migration) and rewrite any legacy /admin/... menu URIs:

    filament-access-management:upgrade strips the /admin prefix from menu uris and sets is_filament_panel = true. It only touches rows whose uri is /admin or /admin/% and is_filament_panel = false, so external URLs are left untouched and the command is idempotent (a re-run with nothing to migrate exits cleanly).

Filament v4 → Filament v5 (both on plugin 3.x)

Filament v5 requires Laravel 12 (and pulls in Livewire 4), so bump them in the same step:

Then follow the official Filament v4 → v5 and Laravel 11 → 12 upgrade guides for your own code, run php artisan migrate (no-op) and re-run php artisan filament-access-management:upgrade.

Notes

🚀 Usage

Upon installation, Menu, Users, Roles and Permissions pages are created. Each user has roles, and each role has permissions.

Menu, Users, Roles & Permissions ![Overview](https://user-images.githubusercontent.com/73818060/232434966-91ab94fe-620a-4894-8632-dbe5e535e5ae.png) **Manage Menu** ![Manage Menu](https://user-images.githubusercontent.com/73818060/232438118-0b4089e7-4ff0-40b8-93b1-c6d4c089ef14.png) **Manage Users and their roles** ![Manage Users](https://user-images.githubusercontent.com/73818060/232437828-73039db1-8976-4a23-a14d-2943d9495a47.png) ![User roles](https://user-images.githubusercontent.com/73818060/232437890-2db887e1-dcbb-4d96-b072-365720be66d7.png) **Manage Roles and their permissions** ![Manage Roles](https://user-images.githubusercontent.com/73818060/232438496-002b56d6-db98-4672-82cc-efcfc06fba9e.png) ![Role permissions](https://user-images.githubusercontent.com/73818060/232438548-29b655bc-d683-4924-90b7-6ba25991d7ff.png) **Manage Permissions** ![Manage Permissions](https://user-images.githubusercontent.com/73818060/232438632-e5d9a5e5-7ef5-4ca5-a330-37948acd9748.png) ![Permission detail](https://user-images.githubusercontent.com/73818060/232438719-fc2bca0b-7233-4aae-bf87-9c1d8524e42d.png)

Routing control

Permissions and routes are bound together. On the edit-permission page, set the routes a permission can access: choose the method in the HTTP method select box, and fill the accessible path in HTTP path.

Goal HTTP path
AccessGET /admin/users /users (with HTTP method = GET)
Access everything under/admin/users /users*
Access the edit page only /users/*/edit
Different method per path GET:users/*
Use a route alias admin.users.show

Super Administrator

Create a super admin user:

Check a permission:

Get the current user:

🧩 Advanced Usage

By default the plugin's menu co-exists with Filament's native navigation. To replace the native navigation with the database-driven menu from this package, edit /config/filament-access-management.php and set filament.navigation.enabled => true:

🧪 Testing

The quick-test CI workflow runs the Pest suite against both Filament v4 and Filament v5 (PHP 8.4, Ubuntu) on every push, PR and tag. A tag whose suite fails is deleted automatically.

📝 Changelog

Please see CHANGELOG for more information on what has changed recently.

🤝 Contributing

Please see CONTRIBUTING for details.

🔒 Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

👏 Credits


🌲 About Solution Forest

Solution Forest

Solution Forest is a web development agency based in Hong Kong. We help customers solve their problems — and we ❤️ open source.

Our products

Open source

You can also sponsor our open source work via GitHub Sponsors. 💚

📄 License

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


All versions of filament-access-management with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^4.0|^5.0
guava/filament-icon-picker Version ^3.0|^4.0
solution-forest/filament-tree Version ^3.0|^4.0
spatie/laravel-package-tools Version ^1.15.0
spatie/laravel-permission Version ^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 solution-forest/filament-access-management contains the following files

Loading the files please wait ...