Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jetstream routes can be accessed although I'm only using Breeze #59

Open
kaiimran opened this issue Sep 9, 2021 · 4 comments
Open

Jetstream routes can be accessed although I'm only using Breeze #59

kaiimran opened this issue Sep 9, 2021 · 4 comments

Comments

@kaiimran
Copy link

kaiimran commented Sep 9, 2021

This is causing problems for people who only use Laravel Breeze, and never install jetstream at all.

To Reproduce

  1. Install fresh laravel 8 app and follow the official docs to use laravel Breeze
  2. Run:
composer require nascent-africa/jetstrap --dev
php artisan jetstrap:swap breeze-inertia
npm install && npm run dev
  1. Comment out everything in routes/auth.php
  2. You can still go to the routes like usual!
  3. Run "php artisan route:list" and you can see all the routes that you never created.

I discovered this problem when I want to change the route name. I remove the route in auth.php and create a new one in web.php. Then it turns out that both old and new routes can still be reached. Why are you adding all the jetstream files in vendor\nascent-africa\jetstrap\src\NascentAfrica\Jetstrap\ for people who only use Breeze: "php artisan jetstrap:swap breeze-inertia" ?

SOLUTION

After you use this package to update to bootstrap, you can just remove it:

  1. composer remove vendor/nascent-africa/jetstrap --dev
  2. Make sure everything is deleted in composer.json, composer.lock, \vendor\nascent-africa\jetstrap\
  3. Run php artisan route:cache if you still see the old page with error about missing controller in browser. It should show 404 | Not Found.
  4. Run php artisan route:list to confirm all the other routes have been removed.
  5. Remove this div too in resources\js\Pages\Auth\Register.vue
    div class="form-group" v-if="$page.props.jetstream.hasTermsAndPrivacyPolicyFeature">
@tsommie
Copy link
Contributor

tsommie commented Sep 9, 2021

Jetstream has been moved to dev dependency in Jetstrap's composer.json, so it shouldn't be included in your installation.

@kaiimran
Copy link
Author

kaiimran commented Sep 9, 2021

Apparently it appeared? Let's say it's not included, then why is in vue the <div v-if="$page.props.jetstream.hasTermsAndPrivacyPolicyFeature"> added here for breeze: https://github.com/nascent-africa/jetstrap/blob/v2.x/breeze/inertia/resources/js/Pages/Auth/Register.vue

@tsommie
Copy link
Contributor

tsommie commented Sep 9, 2021

Apparently it appeared? Let's say it's not included, then why is in vue the <div v-if="$page.props.jetstream.hasTermsAndPrivacyPolicyFeature"> added here for breeze: https://github.com/nascent-africa/jetstrap/blob/v2.x/breeze/inertia/resources/js/Pages/Auth/Register.vue

Ok, thanks for pointing that out, will fix this.

tsommie added a commit that referenced this issue Sep 9, 2021
@tsommie
Copy link
Contributor

tsommie commented Sep 9, 2021

I think installing Jetstrap without the --dev flag will prevent installing all its dev dependencies. Will try that out and if it fixes the problem then i'll update the docs. I think that would make steps 3 and 4 optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants