mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
Vourcherify
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Spatie\Permission\Traits\HasRoles;
|
||||
@@ -65,4 +66,12 @@ class User extends AbstractModel implements
|
||||
{
|
||||
return $this->belongsToMany(Company::class, (new Employee())->getTable(), 'user_id', 'company_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HasMany
|
||||
*/
|
||||
public function redemptions(): HasMany
|
||||
{
|
||||
return $this->HasMany(VoucherRedemption::class, 'user_id', 'id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user