Created
April 16, 2015 02:59
-
-
Save russweas/7cd08c19e4f1f4f1a209 to your computer and use it in GitHub Desktop.
Laravel Lumen CORS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$app->get('user/{id}', function($id) use ($app) { | |
return response() | |
->json([ | |
"name" => 'Billy', | |
'age' => '42' | |
]) | |
->header('Access-Control-Allow-Origin', '*'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment