Download the PHP package victormgomes/rest-messages without Composer
On this page you can find all versions of the php package victormgomes/rest-messages. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download victormgomes/rest-messages
More information about victormgomes/rest-messages
Files in victormgomes/rest-messages
Package rest-messages
Short Description Standardized message responses for REST resources
License MIT
Homepage https://github.com/victormgomes/rest-messages
Informations about the package rest-messages
REST Messages
Standardized message responses for REST resources
Introduction
Rest Messages is a lightweight package designed to standardize success messages across your Laravel REST API. It automatically detects the model name and the current CRUD action (index, store, update, destroy) to generate localized and professional response messages.
Why use this package?
- Consistency: Ensure every success response in your API follows the same linguistic pattern.
- Automatic Detection: No need to manually type messages for every controller action. The package "just knows" what you're doing.
- Localized: Built-in support for multiple languages with proper grammar and gender resolution for model names.
- Clean API: Focus on your data, while the package handles the communication part of your REST interface.
Support us
We invest a lot of resources into creating best in class open source packages. You can support us by sponsoring us on GitHub.
Installation
You can install the package via composer:
Usage
Simply use the HasResourceMessages trait in your response helpers or base controllers.
The $this->message() method will automatically resolve the model and action from the current route context. For example, if called from UserController@store, it will return: "User created successfully."
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
- Victor M. Gomes
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of rest-messages with dependencies
spatie/laravel-package-tools Version ^1.16
doctrine/inflector Version ^2.0
illuminate/contracts Version ^11.0||^12.0||^13.0
illuminate/support Version ^11.0||^12.0||^13.0
illuminate/database Version ^11.0||^12.0||^13.0
illuminate/http Version ^11.0||^12.0||^13.0
illuminate/translation Version ^11.0||^12.0||^13.0
illuminate/console Version ^11.0||^12.0||^13.0
illuminate/routing Version ^11.0||^12.0||^13.0