Skip to content

Commit f6beaac

Browse files
committed
Allowing the User class to be renamed
1 parent fe6f8aa commit f6beaac

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/Config/quickadmin.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727

2828
// If set to true, you'll need to copy the routes
2929
// from vendor/laraveldaily/quickadmin/src/routes.php into your own /routes folder
30-
'standaloneRoutes' => false
30+
'standaloneRoutes' => false,
31+
32+
// Used to define relationship with UserLogs
33+
'userModel' => \App\User::class
3134

3235
];

src/Models/UsersLogs.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ class UsersLogs extends Model
1414

1515
public function users()
1616
{
17-
return $this->hasOne('App\User', 'id', 'user_id');
17+
return $this->hasOne(config('quickadmin.userModel'), 'id', 'user_id');
1818
}
19-
}
19+
}

0 commit comments

Comments
 (0)