Error “Target class controller does not exist” when using Laravel 8
Here is my controller: <?php namespace App\Http\Controllers\Api; use App\Http\Controllers\Controller; use Illuminate\Http\Request; class RegisterController extends Controller { public function register(Request $request) { dd('aa'); } } As seen in the screenshot, the class exists and is in the correct place: My api.php route: Route::get('register', 'Api\RegisterController@register'); When I hit my register route using Postman, it gave me the following error: Target class [Api\RegisterController] does not exist. How can I fix it? Thanks to the answers, I was able to fix it. I decided to use the
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.