PHP code example of aelnemr / api-response
1. Go to this page and download the library: Download aelnemr/api-response 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/ */
aelnemr / api-response example snippets
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use AElnemr\RestFullResponse\CoreJsonResponse;
class CountryController extends Controller
{
use CoreJsonResponse;
public function index()
{
$data = \App\User::get();
return $this->ok($data);
}
}