Skip to content

Instantly share code, notes, and snippets.

@rsanchez
Last active August 29, 2015 13:57
Show Gist options
  • Save rsanchez/9549396 to your computer and use it in GitHub Desktop.
Save rsanchez/9549396 to your computer and use it in GitHub Desktop.
Deep + Resource Router
<?php
use rsanchez\Deep\Deep;
use rsanchez\Deep\App\Entries;
$config['resource_router'] = array(
'json' => function($router) {
Deep::bootEloquent(ee());
$entries = Entries::channel('blog')->limit(10)->get();
return $router->json($entries);
},
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment