Download the PHP package vimatech/laravel-membership without Composer

On this page you can find all versions of the php package vimatech/laravel-membership. 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 laravel-membership

Laravel Membership

CI Latest Version on Packagist Total Downloads License

Polymorphic memberships for Laravel.

Laravel Membership lets you attach members and roles to any Eloquent model — organizations, teams, projects, workspaces, communities, or anything else.

It answers who belongs to what and with which role — nothing more.

Why Laravel Membership?

Most Laravel apps eventually need to answer:

Laravel Membership provides a small backend-only layer for that.

Feature Matrix

Feature Supported
Polymorphic memberships
Enum roles
Role hierarchy
Guards (last owner, etc.)
Events
Scopes
Soft deletes
Policy helpers
Invitations ➕ (use Laravel Invitation)
Permissions ❌ (use Spatie)
Billing
UI

Laravel Membership vs Permissions

Laravel Membership manages:

Permission packages (like Spatie) manage:

They are complementary, not competing.

Use Cases

Installation

Requirements

Publish config

Publish migrations

Usage

Make a model have members

Make a model act as a member

Create a roles enum (optional)

You can also use plain strings — enums are optional.

Add a member

Remove a member

Update a role

Check membership

Query members

Query memberships from member side

Scopes

Policy helpers

Facade (optional)

Complete Example

Events

The following events are dispatched:

Event When
MemberAdded After a member is added
MemberRemoved After a member is removed
MemberRoleUpdated After a member's role is changed

Each event contains the Membership instance and an optional $actor.

Guards

Guards are configurable protections in config/membership.php:

When prevent_self_demotion or prevent_role_escalation are enabled, pass an $actor:

Configuration

Soft Deletes

By default, removing a member permanently deletes the row. To keep membership history instead, enable soft deletes:

  1. Set 'soft_deletes' => true in config/membership.php

  2. If your app is already in production, create a migration:

If you enable soft_deletes before running your initial migration, the column is added automatically.

Once enabled:

Philosophy

Laravel Membership is intentionally minimal.

The package focuses on:

Design principles:

It does not aim to become a permissions framework, a billing system, a UI framework, or a complete SaaS platform.

Possible Future Extensions

Future extensions may be released as separate packages to keep the core package small and focused.

Testing

Contributing

Contributions are welcome.

Please ensure:

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our Security Policy for reporting vulnerabilities.

License

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

Credits

Built and maintained by Vimatech. Created by Adel Zemzemi.


All versions of laravel-membership with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/contracts Version ^11.0|^12.0|^13.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 vimatech/laravel-membership contains the following files

Loading the files please wait ...