PHP code example of knplabs / muse

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

    

knplabs / muse example snippets

 php
$schema = <<<SCHEMA
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "name": {
      "type": "string"
    }
  }
}
SCHEMA;


echo "Dumb data provider\n";
echo \Muse\MuseFactory::createDumbMuse()->inspire($schema);

echo "\n\n";
echo "Random data provider\n";
echo \Muse\MuseFactory::createRandomMuse()->inspire($schema);