TitasGailius / laravel-moonlight

Batteries included Laravel preset based on InertiaJS, VueJS and TailwindCSS stack.
145 stars 10 forks source link

Plans to update to fortify? #12

Closed devingray closed 3 years ago

devingray commented 4 years ago

Hi @TitasGailius

I wonder if you have any plans to update this to use Laravel Fortify Auth instead of the custom controllers. I know There is already Jetstream but TBH I like to build my own components.

If this is something you are thinking to do with this package, happy to help

TitasGailius commented 4 years ago

Hey @devingray,

yeah, I think that's a great idea.

The only customization this package has for the auth stuff is overriding which views to show.

In Fortify, it's all about registering these views in a service provider so I think that would be a fairly simple change to this package.

use Laravel\Fortify\Fortify;

Fortify::loginView(function () {
    return view('auth.login');
});

For me personally, there are no gains of using Fortify over laravel/ui scaffolding but I'd be more than happy to accept a PR that uses Fortify.

devingray commented 4 years ago

💯 Awesome, I will look into that this week, I think super simple approach, perhaps a --fortify flag that will not render the routes and instead load them in the service provider. Will see as I go

devingray commented 3 years ago

Closing until fortify is more docmented