Level 5
Refer to this if you're still having issues
I decided to stick with Bootstrap over Tailwind.
I executed the following:
$ composer require laravel/ui
$ php artisan ui bootstrap
$ npm install && npm run dev
$ php artisan ui:auth
$ php artisan serve
And when I click on the HOME link in the WELCOME (i.e. http://127.0.0.1:8000/home), I get the following error:
Illuminate\Contracts\Container\BindingResolutionException
Target class [HomeController] does not exist.
http://127.0.0.1:8000/home
Illuminate\Container\Container::build
vendor/laravel/framework/src/Illuminate/Container/Container.php:811
Here is the new (auto generated) routes/web.php:
Route::get('/', function () {
return view('welcome');
});
Auth::routes();
Route::get('/home', 'HomeController@index')->name('home');
I think it may be a namespace problem but I cannot seem to see it....
Have you tried to import the HomeController or try the full namespace, like this:
Route::get('/home', 'App\Http\Controllers\HomeController@index')->name('home');
As I think that Laravel in version 8 removed the default namespace from the RouteServiceProvider.
Please or to participate in this conversation.