We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Target class [...\Http\Controllers\...] does not exist. When creating addons routes

Simon Bédard October 23, 2020 by Simon Bédard

I’m trying to setup basic routes for my addons like so.

// /routes/cp
Route::prefix('yqb/')->name('yqb.')->group(function() {
    Route::get('/', "[email protected]")->name('index');
});

Basicly, this is suppose to call the index fonction in my YqbController located in

/Http/Controllers/YqbController.php

But every time I try to access this page in my CP, I get

Illuminate\Contracts\Container\BindingResolutionException
Target class [Yqb\DecryptionNas\Http\Controllers\YqbController] does not exist.

Fo now, my controller is very simple

<?php

namespace Yqb\DecryptionNas\Http\Controllers;

class YqbController
{
    public function index()
    {
        return view('yqb::index');
    }
}

I’m not sure what i’m missing. Can someone help me with that.

Answered by Simon Bédard!
>>>>>>> Answered <<<<<<<
5 Replies
2 Followers