PHP code example of rebelcode / atlas

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

    

rebelcode / atlas example snippets


use RebelCode\Atlas\Atlas;

$atlas = new Atlas();

$users = $atlas->table('users');

$query = $users->select(/* ... */);
$query = $users->insert(/* ... */);
$query = $users->update(/* ... */);
$query = $users->delete(/* ... */);
$query = $users->create(/* ... */);
$query = $users->drop(/* ... */);

use function RebelCode\Atlas\asc;

$query = $query->where($users->role->eq('admin'))
               ->orderBy(asc($users->name))
               ->limit(20)
               ->offset(10);

$sql = $query->render();
$result = $query->exec();