how to remove jetstream and fortify in laravel?

Viewed 7939

I am trying to remove Fortify and Jetstream packages from Laravel so I removed them from App. Providers, from composer.json (require section), Actions, Config, vendor. Then I run composer update and I get the following message:

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

I also remove sanctium from the same locations

2 Answers

Only remove from composer.json file won't delete them fully. You need to remove and modify some file manually.

Edit away

app/Http/Kernel.php - \Laravel\Jetstream\Http\Middleware\AuthenticateSession::class,
app/Models/User.php - use HasProfilePhoto;
config/app.php - App\Providers\FortifyServiceProvider::class,
config/app.php - App\Providers\JetstreamServiceProvider::class,
routes/web.php - routes with auth:sanctum

Delete

app/Providers/FortifyServiceProvider.php
app/Providers/JetstreamServiceProvider.php
app/View/Components/AppLayout.php
app/View/Components/GuestLayout.php
app/Actions/Fortify/
app/Actions/Jetstream/

config/fortify.php
config/jetstream.php
config/sanctum.php

I'm using Laravel 8. The solution may differ depending on the version.

Related