File tree Expand file tree Collapse file tree 4 files changed +33
-3
lines changed Expand file tree Collapse file tree 4 files changed +33
-3
lines changed Original file line number Diff line number Diff line change 48
48
* The attribute used to display the user's name.
49
49
*/
50
50
'user_name_attribute ' => 'name ' ,
51
+
52
+ /*
53
+ * Authenticatable model class
54
+ */
55
+ 'authenticatable ' => \App \Models \User::class,
51
56
];
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ return [
4
+ 'comments ' => 'Комментарии ' ,
5
+ 'comments.add ' => 'Добавить комментарий ' ,
6
+ 'comments.empty ' => 'Комментариев пока нет. ' ,
7
+ 'comments.placeholder ' => 'Добавить комментарий... ' ,
8
+
9
+ 'notifications.created ' => 'Комментарий добавлен. ' ,
10
+ 'notifications.deleted ' => 'Комментарий удален. ' ,
11
+
12
+ 'modal.heading ' => 'Комментарии ' ,
13
+ ];
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ return [
4
+ 'comments ' => 'Коментарі ' ,
5
+ 'comments.add ' => 'Додати коментар ' ,
6
+ 'comments.empty ' => 'Поки немає коментарів. ' ,
7
+ 'comments.placeholder ' => 'Додати коментар... ' ,
8
+
9
+ 'notifications.created ' => 'Коментар додано. ' ,
10
+ 'notifications.deleted ' => 'Коментар видалено. ' ,
11
+
12
+ 'modal.heading ' => 'Коментарі ' ,
13
+ ];
Original file line number Diff line number Diff line change 2
2
3
3
namespace Parallax \FilamentComments \Models ;
4
4
5
- use Illuminate \Contracts \Auth \Authenticatable ;
6
5
use Illuminate \Database \Eloquent \Builder ;
7
6
use Illuminate \Database \Eloquent \MassPrunable ;
8
7
use Illuminate \Database \Eloquent \Model ;
@@ -23,9 +22,9 @@ class FilamentComment extends Model
23
22
24
23
public function user (): BelongsTo
25
24
{
26
- $ authenticatable = app (Authenticatable::class );
25
+ $ authenticatable = config ( ' filament-comments.authenticatable ' );
27
26
28
- return $ this ->belongsTo ($ authenticatable::class , 'user_id ' );
27
+ return $ this ->belongsTo ($ authenticatable , 'user_id ' );
29
28
}
30
29
31
30
public function subject (): BelongsTo
You can’t perform that action at this time.
0 commit comments