Skip to main content

Resolving the authenticated user

By default, when a new comment is made, the Commenter is automatically set to the current user logged in user (auth()->user()). If you want to change this behavior, you can implement your own resolver:

use Kirschbaum\Commentions\Config;

Config::resolveAuthenticatedUserUsing(
fn () => auth()->guard('my-guard')->user()
)