Last active
August 29, 2015 14:22
-
-
Save jabdul/e635a3b37372f0fbdc53 to your computer and use it in GitHub Desktop.
Stored procedure call in Laravel 5.0
This file contains 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
if (isset($uri)) { | |
$result = DB::statement('CALL get_address_id(?, @address_id)', | |
array($uri) | |
); | |
$address_id = DB::select('SELECT @address_id'); | |
$address_data = DB::select('CALL get_address(?)', | |
array($address_id[0]->{'@address_id'}) | |
); | |
return $this->createJSONResponse(array(get_object_vars($address_data[0])), $uri, null); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment