PHP code example of lhsazevedo / slim-restatic-skeleton

1. Go to this page and download the library: Download lhsazevedo/slim-restatic-skeleton 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/ */

    

lhsazevedo / slim-restatic-skeleton example snippets


// database
$container['db'] = function ($c) {
	$settings = $c->get('settings')['database'];
    return new Foo\Database($settings);
};

// src/Facades/Db.php

namespace App\Facades
{
    use ReStatic\StaticProxy;

    class Db extends StaticProxy
    {
        public static function getInstanceIdentifier()
        {
            return 'db';
        }
    }
}

Db::select('*')->from('users');