Download the PHP package nickjbedford/laravel-endpoints without Composer
On this page you can find all versions of the php package nickjbedford/laravel-endpoints. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nickjbedford/laravel-endpoints
More information about nickjbedford/laravel-endpoints
Files in nickjbedford/laravel-endpoints
Package laravel-endpoints
Short Description The Laravel Endpoints framework provides an easy way to implement API endpoints in separate Responsable-style classes.
License MIT
Informations about the package laravel-endpoints
Laravel Endpoints
The Laravel Endpoints framework provides an easy way to implement API endpoints in separate classes that are then registered automatically based on the properties defined in each endpoint subclass.
To create an endpoint, extend the YetAnother\Laravel\Endpoint
abstract class,
defining whether to include the GET, POST, UPDATE or DELETE route methods. You
must also specify the URI of the route as well as the route prefix for all
automatically registered routes.
The Endpoint
base class provides convenient methods to return JSON success,
failure and exception response in a standard structure according to the
nickjbedford/json-response-laravel package.
Registering Endpoints
Manual Registration
The Endpoint
base class includes the register()
method for automatically
registering the endpoint's routes. Simply call $endpoint->register()
on all of your endpoint subclass instances to register them.
Service Provider Registration
This package also includes the YetAnother\Laravel\EndpointServiceProvider
service provider class that can be used alongside a config/endpoints.php
configuration file.
[config/app.php]
Add the YetAnother\Laravel\EndpointServiceProvider::class
entry to the array of 'providers'
in the config/app.php
configuration file.
[config/endpoints.php]
Create a PHP file in the config directory called endpoints.php and have it return an array of endpoint class names from your codebase.
All versions of laravel-endpoints with dependencies
laravel/framework Version >=8
nickjbedford/json-response-laravel Version *
ext-json Version *