/api/topics
Laravel では、次の例で、ルートからの json 応答を$topics
バックエンドの変数に割り当てるにはどうすればよいですか?
API:
Route::get( '/api/topics', function()
{
return Topic::all();
});
バックエンド:
Route::get( '/backend/topics', function()
{
$topics = // call to route /api/topics goes here;
return View::make( 'backend.topics' )->with( array( 'topics' => $topics ) );
});