PHP code example of carminemm / query-craft

1. Go to this page and download the library: Download carminemm/query-craft 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/ */

    

carminemm / query-craft example snippets


use CarmineMM\QueryCraft\Facades\Connection;
use CarmineMM\QueryCraft\Data\Model;

Connection::connect(config: [
    'driver' => 'mysql',
    'host' => '127.0.0.1',
    'username' => 'root',
    'password' => '',
    'database' => '',
    'options' => [], // PDO options
]);

$model = new Model('star_client');
$model->setTable('products');

$data = $model->all();