1. Go to this page and download the library: Download guilhermecostam/lamiaphp 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/ */
guilhermecostam / lamiaphp example snippets
namespace App\Controllers;
use App\Core\Controller;
class CoffeeController extends Controller
{
//
}
use App\Core\View;
// ...
(new View)->render('coffee/index');
// ...
php
# in controller
$messages = [
'lorem' => 'ipsum'
];
(new View)->render('coffee/index', $messages);
# in view
$args['lorem']; // return must be: 'ipsum'
php
$routes = array_merge(
php
# query for returns rows
$this->db->row('SELECT * FROM beers');
# query for returns columns
$this->db->column('SELECT * FROM beers');
php
# query for returns rows with bind params
$params = [
'field' => 'brand'
];
$this->db->row('SELECT :field FROM beers', $params);
php
public function validations(): array
{
return array_merge(
parent::validate('lorem', [
''Field should be boolean',
]),
);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.