1. Go to this page and download the library: Download nafisc/simple-eloquent 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/ */
// Retrieve the Connection
$connection = Connection::get('test');
// Execute some Sql
$result = $connection->select('SELECT * FROM `servers` LIMIT 1');
$server = $result[0];
echo $server->ipv4.PHP_EOL;
. . .
// Alternately, you can access the eloquent
// connection object directly.
$connection = Connection::get('test')->eloquentConnection();
$result = $connection->select('SELECT * FROM `servers` LIMIT 1');
// Retrieve the connection.
$connection = Connection::get('test');
// Create a new model for the table 'servers'.
// See \SimpleEloquent\Connection@model function for more documentation.
$model = $connection->model('servers');
// Retrieve a result.
$result = $model->where('id', 2)->first();
echo $result->ipv4.PHP_EOL;
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.