Download the PHP package william/laravel-rigger without Composer

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

laravel-rigger

Laravel Rigger is inspired by facebook/graphql, which is a query language for APIs. But I think its granularity is too thin to use in web development area. Using entity as query's minimum unit is better to generate a restful back-end swiftly based on a few necessary configuration, which describe the entities and relations.

Table of contents

Installation

Composer

Laravel

Only support Laravel >= 5.5, and the ServiceProvider will be attached automatically. Publish entity config is necessary:

This will generate config/entities.php and config/rigger.php files. Then register the routes in RouteServiceProvider:

You can use this command to check generated routes.

Entity Description

All the models/entities wanted to be handled by rigger should be defined in config/entities.php.

Relations

Support four relations: hasOne belongsTo hasMany belongsToMany. Items in these arrays can be an array or a string. Take User as an example, User may have many Roles through user_role table, so you can define it like this:

If you want to modify the joining table, you can use an array:

All these definitions are consistent to the doc in https://laravel.com/docs/5.5/eloquent-relationships

Query

This part is powered by andersao/l5-repository, and its most exciting function is allow front-end to perform a dynamic search, filter the data and customize the queries. Check the Reference

Fields which can be searched by this way should be defined in config/entities.php. For example:

Include

This part is powered by spatie/laravel-fractal, and it allows front-end to include (a.k.a embedding, nesting or side-loading) relationships for complex data structures. For example, when you are querying /users, you may want to know their roles information at the same time. So you can add include parameters, like /users?include=roles:

All the relations defined in hasOne belongsTo hasMany and belongsToMany can be fetched by this way. If you want to add some limitations, you can add availableIncludes array to your entity. If so, keys only in the array can be parsed even though they defined in relations.

Authenticate and Authorize

Rigger use spatie/laravel-permission as basic validator. There are three control layers in rigger: global layer, entity layer and action layer. In every layer, there exist two key words authorize and authenticate to control the behaviour. authorize describes which permissions or roles are needed, and authenticate determines whether the user need to login.

authenticate

Only true of false can be set

authorize

role and permission are supported. You can alse set placeholder ${action} ${resource} in the permission. For example, if you set permission as ${action}-${resource} in user item, when visiting GET /users, permssion index-user will be required.

three control layers

When visiting a specific action, it will check whether this resource has a detailed action-control, if so, then parse it. If not, it will use entity-control. However, if entity-control doesn't exist, global-control will active which located in rigger.php


All versions of laravel-rigger with dependencies

PHP Build Version
Package Version
Requires illuminate/database Version ~5.5
illuminate/support Version ^5.5
illuminate/routing Version ^5.5
prettus/l5-repository Version ^2.6
spatie/laravel-permission Version ^2.7
spatie/laravel-fractal Version ^5.3
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 william/laravel-rigger contains the following files

Loading the files please wait ....