1. Go to this page and download the library: Download ornitophp/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/ */
$builder = User::query()
->where('active', 1)
->orderBy('created_at', 'DESC');
echo $builder->toSql(); // SELECT * FROM users WHERE active = ? ORDER BY created_at DESC
print_r($builder->getBindings()); // [1]
echo $builder->toPreviewSql(); // SELECT * FROM users WHERE active = 1 ORDER BY created_at DESC
// This is how every controller works:
public function index(Request $request): Response
{
return $this->view('home', ['title' => 'Welcome']);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.