Skip to content

Commit

Permalink
Merge pull request coderflexx#19 from ennikin-skywalker/add-right-use…
Browse files Browse the repository at this point in the history
…rmodel-to-ticketmodel

add right usermodel to ticketmodel
  • Loading branch information
ousid authored Feb 5, 2023
2 parents 0f671c1 + 791562c commit 6540e2d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Models/Ticket.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Foundation\Auth\User;

/**
* Coderflex\LaravelTicket\Models\Ticket
Expand Down Expand Up @@ -45,7 +44,7 @@ class Ticket extends Model
*/
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
return $this->belongsTo(config('auth.providers.users.model'));
}

/**
Expand All @@ -55,7 +54,7 @@ public function user(): BelongsTo
*/
public function assignedToUser(): BelongsTo
{
return $this->belongsTo(User::class, 'assigned_to');
return $this->belongsTo(config('auth.providers.users.model'), 'assigned_to');
}

/**
Expand Down

0 comments on commit 6540e2d

Please sign in to comment.