Skip to content

Commit

Permalink
add right usermodel to ticketmodel
Browse files Browse the repository at this point in the history
  • Loading branch information
ennikin-skywalker committed Feb 3, 2023
1 parent 0f671c1 commit 791562c
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 791562c

Please sign in to comment.