2

I have installed Laravel 8 as a new project. When I run the project I get the "In order to use the Auth::routes() method, please install the laravel/ui package." But Laravel installation doc says that laravel ui is depreciated and that we should use Jetstream. So I installed Jetstream with the Livewire stack. Back to test the project and I get the same error msg.

I have run a composer dump-autoload.

What do I have to do to get a Laravel 8 project to run?

lagbox
  • 48,571
  • 8
  • 72
  • 83
GreatDayDan
  • 169
  • 4
  • 16
  • 2
    you can still technically install `laravel/ui` (the composer requirements were updated to work with version 8 of the libraries, so it will install) and jetstream does not come with that method for `Auth` or controllers or traits that you are used to ... jetstream is a completely different animal all together – lagbox Sep 16 '20 at 19:04
  • Thanks, lagbox. Did just that. – GreatDayDan Sep 17 '20 at 11:56

2 Answers2

1

You will need to clear and recreate cache. Run the following php artisan commands:

php artisan cache:clear
php artisan config:cache
php artisan route:cache
Elisha Senoo
  • 3,489
  • 2
  • 22
  • 29
1

I had this problem as well on many 'upgrades' from earlier versions of Laravel. I don't want to change the entire auth mechanism, as it works, so I will keep the code I have.

@Elisha Senoo's answer is correct, and solved it most of the time. However, if you find yourself unable to clear the cache (because it has the same error message on the artisan command), the solution is to manually clear the .php files within the bootstrap/cache folder and then php artisan config:cache.

Watercayman
  • 7,970
  • 10
  • 31
  • 49
  • 1
    Your comment really saved me :) thank you thank you, I upgrade from my laravel 6 to 7, but on production keep got error Auth::route() method need laravel package ui. On my local everything work fine, but when I upload vendor folder to production (shared hosting) manually, its error, then I try delete .php files within bootstrap/cache folder, its working. – Eko Syahputra Feb 06 '22 at 05:02