PHP code example of f9webltd / laravel-api-response-helpers
1. Go to this page and download the library: Download f9webltd/laravel-api-response-helpers library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
f9webltd / laravel-api-response-helpers example snippets
namespace App\Http\Api\Controllers;
use F9Web\ApiResponseHelpers;
use Illuminate\Http\JsonResponse;
class OrdersController
{
use ApiResponseHelpers;
public function index(): JsonResponse
{
return $this->respondWithSuccess();
}
}