Download the PHP package obrainwave/access-tree without Composer

On this page you can find all versions of the php package obrainwave/access-tree. 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 access-tree

Laravel Access Tree

Latest Version on Packagist Total Downloads

πŸŽ‰ AccessTree 2.2.0 - Major Release

Version 1.x is deprecated. Please follow the Upgrade Guide before updating.

What's New in 2.2?

And much more! See the Features section below.


A comprehensive Laravel package for managing user permissions and roles with database-driven access control.

This package is a lightweight, database-driven RBAC (roles & permissions) package for Laravel with convenient helpers, facades, caching, seeding and middleware.

Quick Start (2 minutes)

Add trait to your User model:

Access the Admin Panel: Visit /admin/accesstree/login after creating a user.

You're done β€” roles, permissions and a seeded admin are ready (if seeding enabled).

Features

Core Features

Admin Interface (New in 2.0+)

Requirements & Compatibility

Installation

1. Require via Composer

Publish and Run Migrations

After running migration, a new column is_root_user will be added to the users table.

Installation Options

The package provides flexible installation options:

Configuration

Publish Config File

Config File Options

After publishing the config file (config/accesstree.php), you can customize the package behavior:

Publish Seeder (Optional)

Seeding Features

The package includes a powerful seeding system that can automatically set up your permissions and roles:

Default Permissions Created:

Default Roles Created:

Seeding

After publishing the seeder, you can customize it at database/seeders/PermissionSeeder.php and run:

Automatic First User as Admin

If enabled in the config file:

The package will automatically assign the very first registered user the Admin role (if it exists).

Add Trait to User Model

Basic Usage

Creating Permissions and Roles

Using service class or the service facade

Using Helper Functions

Managing User Roles

Checking Permissions and Roles

Blade Directives

Root User Feature

Admin Interface

Getting Started with Admin Interface

The AccessTree package includes a powerful built-in admin interface for managing permissions, roles, users, and all your database tables.

Installation

Access the Admin Panel

  1. Visit /admin/accesstree/login
  2. Login with your user credentials
  3. Access the full admin dashboard

Features

Dashboard
Permission Management
Role Management
User Management
Universal Table Management (New!)

Automatically manage ALL database tables with full CRUD operations:

Features:

System Pages
UI Features

Configuring Universal Table Management

By default, the admin interface manages ALL database tables. You can configure this:

Dashboard Table Cards:

Customization

Custom Favicon

Custom Styling

Custom CSS Examples

Simple Branding (.env file):

Complex Styling (config file):

Custom JavaScript Examples

Simple Analytics (.env file):

Advanced Functionality (config file):

Environment Variables (.env)

Accessing Admin Programmatically

The admin routes are automatically registered. You can customize them by publishing and editing routes/accesstree-admin.php.

Default Route Prefix: /admin/accesstree

Middleware Usage

Protect your routes:

Middleware supports role:slug prefix to explicitly request role checks. It returns JSON 403 for XHR or redirects back/route with danger flash message.

Artisan Commands

Available Commands

Command Descriptions

Core Commands

User Management

Table Management

Styling & UI

Testing & Debugging

Maintenance

Warning:

Unlike php artisan migrate:fresh, this command does not wipe your entire database. It will only truncate AccessTree-related tables defined in config/accesstree.php (by default):

Advanced Usage

Using Service Directly

Data Retrieval

Available Methods

Service Class Methods

HasRole Trait Methods

Helper Functions

Database Schema

The package creates these tables:

Caching & Performance

Testing

Quick example using Laravel feature testing:

Seeders can be run in tests to prepare default roles/permissions.

API Responses & AJAX (example)

When using the package with AJAX (e.g., to modify roles/permissions), the package returns JSON from service controllers (if you build them) and helper functions can be adapted to return structured responses (status/message). Keep errors user-friendly in production, and enable dev logging in local env.

Security

If you discover any security issues, please email the maintainers at ([email protected]) instead of using the issue tracker.

License

The MIT License (MIT). Please see LICENSE.md for more information.

Contributing

We welcome contributions! Please see CONTRIBUTING.md for coding standards, testing instructions, and local development setup.

Roadmap

βœ… Completed (v2.2+)

πŸ”œ Planned Improvements

If you want any roadmap item prioritized β€” open an issue or PR.

Acknowledgements

Inspired by common RBAC patterns (and packages like spatie/laravel-permission). Access Tree focuses on lightweight, configurable seeding and an intuitive helper API.


All versions of access-tree with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
spatie/laravel-package-tools Version ^1.14.0
illuminate/contracts Version *
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 obrainwave/access-tree contains the following files

Loading the files please wait ...