Skip to content

Commit

Permalink
Fixed attach to relation
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Feb 26, 2015
1 parent 5010720 commit a20e1f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/admin/AccessoriesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,9 @@ public function postCheckout($accessoryId)
// Update the accessory data
$accessory->assigned_to = e(Input::get('assigned_to'));

$accessory->users()->attach($accessoryId, array('assigned_to' => e(Input::get('assigned_to'))));
$accessory->users()->attach($accessory->id, array(
'accessory_id' => $accessory->id,
'assigned_to' => e(Input::get('assigned_to'))));

$logaction = new Actionlog();
$logaction->accessory_id = $accessory->id;
Expand Down

0 comments on commit a20e1f6

Please sign in to comment.