I'm currently building a SPA with vue and installed jetstream (that comes with fortify) and using inertiajs to get my vue components. Is there a way to use inertia::render('')
when i use Fortify::loginView()
?
Asked
Active
Viewed 2,229 times
5

Joundill
- 6,828
- 12
- 36
- 50

Gianlucas Galati
- 51
- 2
-
have you found a solution? – xperator Sep 23 '20 at 12:14
2 Answers
3
I have it working right now by requiring Intertia in the FortifyServiceProvider, and just calling an Inertia render like normal.
Fortify::loginView(function () {
return Inertia::render('Login');
})

spencerrlongg
- 43
- 8
-
Where do you exactly put this? also any instructions on how to use Inertia with Fortify? I click the login button but nothing happens when page is refeshed. – xperator Jun 02 '21 at 18:09
-
-
Actually I found the solution. I forgot adding `HandleInertiaRequests` middleware in the kernel file. Also the code snippet you posted was not required at all, at least in my case. – xperator Jun 09 '21 at 12:00
0
I wanted to do the same thing, but looking at the current documentation, I don't think it's possible.
https://jetstream.laravel.com/1.x/features/authentication.html#views