상속: extends Controller
예제 #1
0
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/
/**
 * Returns the latest github feed in json format
 * Uses 2 hours file cache mechanism
 */
$app->get('github', function () use($app) {
    return GithubController::getData();
});
/**
* Returns the latest instagram feed in json format
* Uses 2 hours file cache mechanism
*/
$app->get('instagram', function () use($app) {
    return InstagramController::getData();
});
/**
* Returns the latest medium feed in json format
* Uses 2 hours file cache mechanism
*/
$app->get('medium', function () use($app) {
    return MediumController::getData();
});