Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 0 0
  1. public function testapi() {
  2.         $request = Request::create('/json/locations', 'GET', array('Hello' => 'World'));
  3.         echo Route::dispatch($request)->getContent();
  4. }
  5.  
  6.  
  7. //Above request calls this function:
  8.  
  9. public function getForUser() {
  10.         echo var_dump(Request::get('Hello'));
  11.         echo '<br>';
  12.         return Response::json(array('message' => 'Index all locations based on User'), 200);
  13. }
  14.  
  15. //The output is:
  16.  
  17. //NULL
  18. //{"message":"Index all locations based on User"}
  19.  
  20. //Why is it null?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement