php - Overriding Laravel's method
one text
Solution:
Right before the final return there is this block:
if ($response = $this->verified($request)) {
return $response;
}
So in your VerificationController
you can override just the verified
method which is meant for that.
If you look into its source you will see it:
So in your local VerificationController add:
protected function verified(Request $request)
{
return $request->wantsJson()
? new Response('', 204)
: redirect($this->redirectPath())->with([
'verified' => true,
'userNotification' => [
'message' => 'Wellcome to my website',
'title' => 'Hello World',
],
]);
}
Source