1
votes

I used 2 routes for calling sam function

  1. Route::get('/sami', 'App\Http\Controller\CommentController@sam');
  2. Route::get('sami',[CommentController::class, 'sam']);

but still got this error - "Illuminate\Contracts\Container\BindingResolutionException Target class [App\Http\Controller\CommentController] does not exist."

1
can you post full controller or namespace used in itJohn Lobo

1 Answers

1
votes

did u put :

      use App\Http\Controller\CommentController ;

you need to add it in the route