Download the PHP package olegstan/laravel-rest without Composer
On this page you can find all versions of the php package olegstan/laravel-rest. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download olegstan/laravel-rest
More information about olegstan/laravel-rest
Files in olegstan/laravel-rest
Package laravel-rest
Short Description Powerful REST for the Laravel framework.
License MIT
Homepage https://github.com/olegstan/laravel-rest
Informations about the package laravel-rest
olegstan/laravel-rest
Package Documentation
Overview
The olegstan/laravel-rest
package offers a streamlined approach to building RESTful APIs with Laravel, emphasizing convention over configuration. It automatically sets up API routes and organizes the application structure to enhance the development of REST APIs. This document guides you through the installation, setup, and basic usage of the package.
Installation
Begin by installing the package through Composer:
This command adds the olegstan/laravel-rest
package to your project, enabling its features and functionalities.
Associated Package
For optimal use of olegstan/laravel-rest
, install the related laravel-request
package, which complements the main package by handling request validations and more. Find it at:
Configuration
After installation, publish the package's assets and configurations to your project:
This command copies necessary files into your project, setting the stage for the API's structure and behavior.
Automatic API Routing
With the package published, API routes are automatically configured. The routing convention follows the pattern:
This pattern facilitates direct access to controller methods via API endpoints. For instance, to access the postStore
method in ClientController
, you would use:
- URL:
/api/v1/call/client/store
- Method: POST
Project Structure
The package organizes your Laravel project in a manner conducive to API development, as follows:
Controllers and Requests
Example request handling:
Handling Data in Controllers
Data sent to an endpoint, such as in the example above, is easily retrievable in the controller:
Support
For questions or further assistance with the olegstan/laravel-rest
package, please reach out to [email protected].