1. Go to this page and download the library: Download devmboo/monolog 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/ */
devmboo / monolog example snippets
class User extends Model {
protected string $tbname = 'users';
}
$user = new User();
$created = $user->create([
'name' => 'John Doe',
'email' => '[email protected]',
'password' => password_hash('secret', PASSWORD_BCRYPT)
]);
if ($created) {
echo "User created successfully!";
}
$user = new User();
$users = $user->all();
print_r($users);
$user = new User();
$foundUser = $user->find(1);
print_r($foundUser);