Simple October CMS Response plugin that allows you to manage responses from your API. The plugin contains a middleware that wraps responses in a configurable format. The plugin is configured through code and does not clutter the administration area with it's own navigation panel.
October CMS Response
1. Check config and configure
<?php return [ 'wrappingEnabled' => true, 'wrappingProperty' => 'data', 'successMessageProperty' => 'message' ];
2. Use middleware globally (Kernel.php) or on specific routes
\Tober\Response\Http\Middleware\ResponseMiddleware::class
3. Use ResponseService class
use Tober\Response\Classes\Services\ResponseService; ResponseService::successMessage($message);
-
This plugin has not been reviewed yet.
-
1.0.1 |
First version of Tober.Response Sep 28, 2024 |
---|