Download the PHP package ibrostudio/laravel-teamable without Composer

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

Laravel Teamable

Add team properties to Eloquent models.

Installation

Install the package via composer:

Then run the installer:

Usage

Configuration

Add the trait IBroStudio\Teamable\Concerns\IsTeamable and the interface \IBroStudio\Teamable\Contracts\Teamable to the Eloquent model which must be a team.

You can define many models as a team according to your needs.

Add the trait IBroStudio\Teamable\Concerns\HasTeams to the Eloquent model that will define member of the team.

Creating team

When you create a model that has the IBroStudio\Teamable\Concerns\IsTeamable trait, a IBroStudio\Teamable\Models\Team model is automatically created using the model's property defined in the teamable.php config file as the team name.

The default model property used is name. If your model does not have name, you can set another property to use in the teamable.php configuration file:

You can disable automatic team creation by setting auto.create to false in the teamable.php configuration file.

To add team to an existing model:

Add member to a team

A user can be a member of multiple teams and different team types:

Current team ID

For ease of use, a current team ID property is stored in a data repository for each team type.

When you add a member to a team, the value is set to that team's ID.

You can retrieve the value with the getCurrentTeamId(TeamType $teamType)method.

To change the current team ID, use the switchToTeam method:

Remove member from a team

Deleting team

Team model is automatically deleted when you delete the model that has the IBroStudio\Teamable\Concerns\IsTeamable trait.

You can disable automatic team deletion by setting auto.delete to false in the teamable.php configuration file.

Testing

Changelog

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

License

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


All versions of laravel-teamable with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ibrostudio/laravel-data-repository Version ^1.0
illuminate/contracts Version ^11.0
michael-rubel/laravel-value-objects Version ^7.0
spatie/laravel-package-tools Version ^1.14.0
spatie/laravel-sluggable Version ^3.5
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 ibrostudio/laravel-teamable contains the following files

Loading the files please wait ....