1. Go to this page and download the library: Download rougin/describe 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/ */
rougin / describe example snippets
php
// index.php
use Rougin\Describe\Driver\MysqlDriver;
$dsn = 'mysql:host=localhost;dbname=test';
$pdo = new PDO($dsn, 'root', '');
$driver = new MysqlDriver($pdo, 'test');
php
namespace Rougin\Describe\Driver;
interface DriverInterface
{
/**
* Returns a list of columns from a table.
*
* @param string $table
* @return \Rougin\Describe\Column[]
*/
public function columns($table);
/**
* Returns a list of tables.
*
* @return \Rougin\Describe\Table[]
*/
public function tables();
}