PHP code example of datado / slim

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

    

datado / slim example snippets



    $app = new \Slim\App;
    \DataDo\Slim::attach($app, $repository);
    
    
    // Or a shortcut if you are in a hurry
    $app = \DataDo\Slim::create($repository);
    
    
    // You can also pass multiple repositories at the same time
    $app = \DataDo\Slim::create($pageRepository, $fileRepository, $userRepository);
    
    // All you need to do now is start the app
    $app->run();