PHP code example of hungnguyenba / apidriver

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

    

hungnguyenba / apidriver example snippets


Hungnguyenba\Apidriver\DatabaseServiceProvider::class

'default' => 'api'

'api' => [
        'driver' => 'api',
        'host' => 'localhost/v1/',
        'database' => '',
        'prefix' => '',
]

use Hungnguyenba\Apidriver\Model\Model;

class User extends Model
{

}

$users = User::where('id', '<', 100)->take(3)->get();
$user = User::find(3);
$user->delete();