1. Go to this page and download the library: Download farme/framework 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/ */
farme / framework example snippets
/**
* @route GET /users/{id}
* @route POST /users
*/
function user_show($params = []) {
$user = user_find($params['id']);
return farme_render('users/show', ['user' => $user]);
}
function user_find($id) {
return farme_find('users', $id);
}
function user_create($data) {
return farme_insert('users', $data);
}