Last active
August 29, 2015 14:15
-
-
Save rsmarshall/24b52155d162d6c781cf to your computer and use it in GitHub Desktop.
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
| /** | |
| * Add an item submitted via the app upload | |
| * | |
| * @param $packId | |
| * @param $quantity | |
| * @param $price | |
| * @param $trolleyId | |
| */ | |
| public function addFromApp($packId, $quantity, $price, $trolleyId) | |
| { | |
| DB::statement("INSERT INTO trolley_items ( `trolley_id`,`pack_id`,`price`,`quantity` ) | |
| VALUES ( ?, ?, ?, ? ) ON DUPLICATE KEY UPDATE `quantity` = `quantity` + 1", | |
| array($trolleyId, $packId, $price, $quantity)); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
public function addFromApp(array $items)
{