byCedric / Allay by byCedric

Build scalable and restful API's, in minutes.
1,828
6
4
Package Data
Maintainer Username: byCedric
Maintainer Contact: me@bycedric.com (Cedric van Putten)
Package Create Date: 2015-10-07
Package Last Update: 2017-12-02
Language: PHP
License: MIT
Last Refreshed: 2024-11-21 03:00:55
Package Statistics
Total Downloads: 1,828
Monthly Downloads: 1
Daily Downloads: 0
Total Stars: 6
Total Watchers: 4
Total Forks: 0
Total Open Issues: 1

Allay

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.