bycedric/allay

Build scalable and restful API's, in minutes.

0.3.0 2017-12-02 15:27 UTC

This package is not auto-updated.

Last update: 2024-12-26 16:33:19 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Code Climate Total Downloads

Allay is a Laravel helper to easily create restful API's. It's designed based on the idea that the resource is responsible for it's own actions. Each of those restful actions are enabled by a boilerplate controller that works for all resources. Every part of Allay is customizable and extendable, making it usable for a lot of usecases.

Requirements

Allay will work with the following requirements.

  • PHP 7.0+
  • Laravel 5.5+

Install

Composer

Composer is a nice tool to download and manage external packages within PHP. If you still live in the dark ages, take a look at their site.

You can add Allay within the require section of your composer.json.

{
    "require": {
        "bycedric/allay": "0.3.*"
    }
}

Or execute the following code inside your CLI.

$ composer require bycedric/allay

Laravel

After the composer installation, we need to add it to Laravel. This can be done by adding the following code to the /config/app.php.

'providers' => [

    /*
     * Laravel Framework Service Providers...
     */
    ...,

    /*
     * Application Service Providers...
     */
    ...,

    ByCedric\Allay\Providers\LaravelServiceProvider::class,

]

Please add the service provider to the bottom of the providers list. If you don't, routes cannot be overwritten.

Lumen

You can also get Allay working on Lumen, a light-weight and blazing fast Laravel version. This can be done by adding the following code to the /bootstrap/app.php.

/*
|--------------------------------------------------------------------------
| Register Service Providers
|--------------------------------------------------------------------------
...
*/

$app->register(ByCedric\Allay\Providers\LumenServiceProvider::class);

Usage

To get started with Allay take a look at the wiki (soon available) pages.

Extensions

Allay is designed to be useful in as much use cases as possible, therefore the core is unopinionated. From the there, you can go your own way. To help you in that, here are some extensions.

  • JSON API (soon available)

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

If you want to extend Allay make sure you run the tests to validate the code.

$ composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email me@bycedric.com instead of using the issue tracker.

Credits

License

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