5

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()?

Joundill
  • 6,828
  • 12
  • 36
  • 50

2 Answers2

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');
    })
  • 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
  • In the Fortify Service Provider, under the boot method. – spencerrlongg Jun 08 '21 at 17:31
  • 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