laravel-user-verification
laravel-user-verification copied to clipboard
support users in a different db connection
https://github.com/jrean/laravel-user-verification/blob/69527fdd760cdd29853846e03504b567aac58c8a/src/UserVerification.php#L271
https://github.com/jrean/laravel-user-verification/blob/69527fdd760cdd29853846e03504b567aac58c8a/src/UserVerification.php#L342
The above two places make it almost impossible to use a different connection than the default(actually it is possible to get around it by changing DB facade temporarily, but it's not the right way), so i would suggest changing the second constructor parameter to $connection
,
- then at places where it needs schema, just do
$connection->getSchemaBuilder()
, - and replace
DB
with$connections
in the above places. - And of course, you need to modify the service provider slightly as well. I would create a PR if you want it.