PHP code example of ibandominguez / restup-back

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

    

ibandominguez / restup-back example snippets




banDominguez\RestUp\App;

App::create([
  'JWT_KEY' => 'supersecret',
  'DB_HOST' => 'localhost',
  'DB_NAME' => 'prueba',
  'DB_USER' => 'root',
  'DB_PASS' => '',
])
->auth([
  '[email protected]' => 'admin'
])
->add('books', [
  ['title' => 'title', 'type' => 'string', 'rules' => 'show'],
  'protected' => ['save']
])
->run(true);