Skip to content

Commit

Permalink
Update ShopOrderTrait.php for l5.2
Browse files Browse the repository at this point in the history
Note: lines 31-37 were causing me issues at the time and i didn't need them so i just commented them out. This may need to be fixed properly for some apps.
  • Loading branch information
ITwrx committed Feb 25, 2016
1 parent 6a0c605 commit 26a7804
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Traits/ShopOrderTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ public static function boot()
{
parent::boot();

static::deleting(function($user) {
if (!method_exists(Config::get('auth.model'), 'bootSoftDeletingTrait')) {
$user->items()->sync([]);
}
//static::deleting(function($user) {
// if (!method_exists(Config::get('auth.model'), 'bootSoftDeletingTrait')) {
//$user->items()->sync([]);
// }

return true;
});
// return true;
//});
}

/**
Expand All @@ -44,7 +44,7 @@ public static function boot()
*/
public function user()
{
return $this->belongsTo(Config::get('auth.model'), 'user_id');
return $this->belongsTo(config('auth.providers.users.model'), 'user_id');
}

/**
Expand Down Expand Up @@ -258,4 +258,4 @@ private function getItem($sku)
->where('order_id', $this->attributes['id'])
->first();
}
}
}

0 comments on commit 26a7804

Please sign in to comment.