I was trying to register user using the Laravel Auth. First I got error with App\User
not found then I fix it with App\Models\User
it works. I don't really know what with Laravel 8 becuase I never had a problem with user registration with previous version. Then I got this problem
BadMethodCallException Method App\Http\Controllers\HomeController::home does not exist.
I don't really know which code to provide since I don't even touch the default code of the Authentication/HomeController.
But I did changed the namespace in RouteProvider
protected $namespace = 'App\Http\Controllers';
web.php
Route::get('/home', [HomeController::class,'home']);
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
/**
* Show the application dashboard.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
public function index()
{
return view('home');
}
}