1. Go to this page and download the library: Download akeren/php-codeboot 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/ */
akeren / php-codeboot example snippets
use App\Models\DB;
use App\Controller\Input;
use App\Helpers\Validate;
use App\Helpers\Hash;
use App\Helpers\Redirect as Direct;
e = ? OR username = ?",
array('kater', 'fabian')
);
/**
* How to check for errors
*/
if ($users->error()) {
echo 'No user!';
} else {
foreach ($users->results() as $user) {
pretty($user);
}
}
/**
* Getting an individual record from the DB
*/
$user = DB::getInstance()->get('users', array('username', '=', 'kater'));
pretty($user->results());
/**
* Using the validation class to validate the user's
* input data
*/
$validate = new Validate();
$validation = $validate->check($_POST, array(
'username' => array(
'stance()->update('users', '2', array(
'name' => Input::get('name')
));
/**
* Delete user's data based upon the provided userID
*
*/
$UpdateUser = DB::getInstance()->delete('users', array(
'user_id', '=', '1'
));
/**
* Redirect a user
*
*/
Direct::to('index');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.