/** * Adds the paths necessary to punt requests off to CompilerFlasher. * @param Blocklyduino $app The current application */ public static function addBuilderRoutes(Blocklyduino $app) { /* POST Requests */ $app->post('/builder/compile', function (Request $request) use($app) { // Break out what we got $builderRequestJSON = $request->getContent(); // Guzzle it and return the results return $app['codebender.post']($app['codebender.builder'](), $builderRequestJSON); })->bind('compile'); }