Download the PHP package vegvisir/laratrust-cli without Composer

On this page you can find all versions of the php package vegvisir/laratrust-cli. 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 laratrust-cli

Laratrust CLI

Latest Stable Version Total Downloads StyleCI License

Provides a command line interface for Laratrust (CLI). Inspired by entrust-cli.

Requirements

You must have Laratrust installed, configured, and working, with database migrated and whatsoever. A good documentation on how to start with Laratrust can be found at https://laratrust.readthedocs.io/en/4.0/index.html.

Good news is that Laratrust CLI is compatible also with Team functionality of the Laratrust package.

Installation

4. Add service provider (Laravel <5.5)

If you're using Laravel up to 5.4.*, you need to add service provider in the providers section of config/app.php:

5. Publish config file

Usage

Laratrust CLI add the folowing artisan commands:

Command Action Parameters Example
*:create Creates a role/permission/team name [display name] [description] laratrust-cli:role:create myrole "My Role"
*:delete Deletes a role/permission/team name laratrust-cli:permission:delete perm1
*:list Lists all roles/permissions/teams none laratrust-cli:role:list
permission:attach Attaches a permission to a role permission_name role_name laratrust-cli:permission:attach perm1 myrole
permission:detach Detaches a permission from a role permission_name role_name laratrust-cli:permission:detach perm1 myrole
role:attach Attaches a role to a user role_name email laratrust-cli:role:attach myrole [email protected]
role:detach Detaches a role from a user role_name email laratrust-cli:role:detach myrole user2
team:create Creates a team name laratrust-cli:team:create myteam
team:delete Deleted a team name laratrust-cli:team:delete myteam

Team functionality

All laratrust-cli:team:* commands will not run unless team functionality is turned on in the Laratrust configuration. Please refer to Laratrust documentation to discover more about team functionality.

User identity

Unlike entrust-cli, Laratrust CLI looks up for users only by e-mail address. However, we intend to extend the functionality of user identification to custom attributes in the future (like in entrust-cli).

User model (Eloquent/MongoDB)

Since we develop this package within an application that utilizes Laratrust with jenssegers/laravel-mongodb, there's a possibility to use it with jenssegers/laravel-mongodb ORM.

In the config/laratrust-cli.php you need to set user_model as \Vegvisir\LaratrustCli\Models\User\UserJenssegersMongodb:

Don't forget to clear your config cache after changing of the configuration:

About

Vegvisir

We're a small development team from Warsaw, Poland, looking to work remotely on your projects!

Bug reporting

Please submit all bugs and issues via GitHub. All feedback will be more than welcome!

Licence

Laratrust CLI is licensed under the GPLv3 License. See the LICENSE file for details.


All versions of laratrust-cli with dependencies

PHP Build Version
Package Version
Requires santigarcor/laratrust Version 4.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 vegvisir/laratrust-cli contains the following files

Loading the files please wait ....