larso/database

The Database package extends from illuminate database.

v1.0 2022-11-21 09:55 UTC

This package is auto-updated.

Last update: 2024-10-21 13:53:35 UTC


README

The Database package extend illuminate database

Use

// index.php

use Larso\Database\DatabaseService;

require 'vendor/autoload.php';

DatabaseService::boot([
	'username' => 'username',
	'password' => 'password',
	'database' => 'dbname'
]);
// YourClass.php

use Larso\Database\LaravelModel;

class YourClass extends LaravelModel {
	protected $table = 'table_name';
}

Facade

use Larso\Database\DB;

$results = DB::select('select * from users where id = ?', [1]);