Skip to content

Commit fdeef97

Browse files
author
gigabyte_tech
committed
added authenticatable model class in config file
1 parent 4425e61 commit fdeef97

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

config/filament-comments.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,9 @@
4848
* The attribute used to display the user's name.
4949
*/
5050
'user_name_attribute' => 'name',
51+
52+
/*
53+
* Authenticatable model class
54+
*/
55+
'authenticatable' => \App\Models\User::class,
5156
];

src/Models/FilamentComment.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ class FilamentComment extends Model
2323

2424
public function user(): BelongsTo
2525
{
26-
$authenticatable = app(Authenticatable::class);
26+
$authenticatable = config('filament-comments.authenticatable');
2727

28-
return $this->belongsTo($authenticatable::class, 'user_id');
28+
return $this->belongsTo($authenticatable, 'user_id');
2929
}
3030

3131
public function subject(): BelongsTo

0 commit comments

Comments
 (0)