I'm getting this error on my laravel 5 project in my login urls:
ReflectionException in Route.php line 280:
Class App\Http\Controllers\Marketplaces\Marketplace1\Auth\AuthController does not exist
This is my routes.marketplace1.php file:
<?php
Route::group(['middleware' => 'web'], function () {
Route::auth();
Route::get('/marketplace/mkt1', '\App\Http\Controllers\Marketplaces\Mkt1Controller@index');
});
And this is my routes.php file:
<?php
Route::group(['middleware' => 'web'], function () {
Route::get('/home', 'HomeController@index');
});
The folder structure is this:
app
Http
Routes
routes.mkt1.php
routes.php
And the folder for the controllers:
app
Http
Controllers
Auth
Marketplaces
Mkt1
Mkt1Controller.php
HomeController.php
And this is my RouteServiceProvider.php
<?php
namespace App\Providers;
use Illuminate\Routing\Router;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
{
protected $namespace = 'App\Http\Controllers';
protected $mkt1Namespace = 'App\Http\Controllers\Marketplaces\Cnova';
public function boot(Router $router)
{
parent::boot($router);
}
public function map(Router $router)
{
$router->group(['namespace' => $this->namespace], function ($router) {
require app_path('Http/Routes/routes.php');
});
$router->group(['namespace' => $this->mkt1Namespace], function ($router) {
require app_path('Http/Routes/routes.mkt1.php');
});
}
}
How can I solve this?