Download the PHP package mrclutch/servio without Composer
On this page you can find all versions of the php package mrclutch/servio. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mrclutch/servio
More information about mrclutch/servio
Files in mrclutch/servio
Package servio
Short Description Servio is a Laravel package designed to streamline and simplify the development of APIs within your Laravel application using a Service-Oriented Architecture (SOA) approach. It provides a standardized way to manage API responses, ensuring consistency and maintainability across services.
License MIT
Informations about the package servio
Servio
Servio is a Laravel package designed to streamline and simplify the development of APIs within your Laravel application using SOA (Service-Oriented Architecture) principles.
Installation
You can install the package via Composer:
Usage
After installing the package, add the service provider to your config/app.php file:
Publish Configuration
Publish the configuration file using the following command:
This command will create a servio.php configuration file in your config directory.
Configuration File
The servio.php configuration file allows you to define the structure and attributes of your services. Here’s an example of how to configure your services:
Configuration Details
-
Service Name: The array key represents the name of the service. This name will be used when generating service components.
-
Table Name: The
tableattribute specifies the database table associated with the service. -
DTO Attributes: Under the
dtokey, you define the fields for the Data Transfer Object (DTO). Each field should have its validation rules specified. - Resource Fields: Under the
resourcekey, list the fields to be included in the resource transformation.
Generating Service Components
You can now use the make:servio command to generate service components:
Replace YourServiceName with the desired name of your service. This command will generate various components for the service based on your configuration.
License
This package is licensed under the MIT License.