1. Go to this page and download the library: Download jakolab/howl-orm 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/ */
jakolab / howl-orm example snippets
# This is your proyect root.
# Requiring Howl.
Autoload();
# Getting the Manager instance.
$db = \Howl\DBManager::getInstance();
$config = [
'host' => 'localhost',
'user' => 'root',
'database' => 'your database',
'password' => 'your password',
];
# Loading the desired driver.
$db->loadDriver(\Howl\DBManager::MYSQL_DRIVER, $config);
namespace Model;
use Howl\Model;
class Items extends Model{
protected $table = "tbl_items";
}
# this is how we create a new record using Howl-ORM
$item = new \Model\Items();
$item->name = "This is the name";
$item->description = "Lorem ipsum dolor sit...";
$item->save();