1. Go to this page and download the library: Download expert-framework/http 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/ */
expert-framework / http example snippets
use ExpertFramework\Http\Router\Router;
Router::get('/home', 'HomeController@index');
Router::post('/users', 'UserController@store');
Router::put('/users/{id}', 'UserController@update');
Router::delete('/users/{id}', 'UserController@destroy');
use ExpertFramework.Http\Response;
$response = new Response();
// Enviar uma resposta JSON com código de status 200
$response->json(['message' => 'Sucesso!'], 200);
// Enviar uma resposta YAML com código de status 201
$response->yaml('message: Sucesso!', 201);
// Definir apenas o código de status 404
$response->status(404);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.