Skip to content

Commit 0747374

Browse files
author
Teekay
committed
Merge pull request antonioribeiro#188
2 parents 60f363c + e8c5cfd commit 0747374

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/Support/Response.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ public function makeRequestOneTimePasswordResponse()
9090
*/
9191
private function getView()
9292
{
93+
if ($this->config('type_view') === 'inertia') {
94+
return \Inertia\Inertia::render($this->config('view'))->toResponse($this->getRequest())->throwResponse();
95+
}
96+
9397
return view($this->config('view'));
9498
}
9599

src/config/config.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@
5454
*/
5555
'otp_secret_column' => 'google2fa_secret',
5656

57+
/*
58+
* Type of user view, blade or inertia
59+
*/
60+
'type_view' => 'blade',
61+
5762
/*
5863
* One Time Password View.
5964
*/

0 commit comments

Comments
 (0)