You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It create a Admin controller with incorrectly namespace
for example:
php artisan module:make EventCenter
In AdminController.php shows:
namespace Modules\EventCenter\Http\Controllers;
but should be:
namespace Modules\EventCenter\Http\Controllers\Admin;
and it create a wrong admin prefix on routes at ServiceProvider:
/**
* Routes for the admin /
Route::group([
'as' => 'eventcenter.',
'prefix' => 'api/eventcenter/admin',
// If you want a RESTful module, change this to 'api'
'middleware' => ['web', 'role:admin'],
'namespace' => 'Modules\EventCenter\Http\Controllers\Admin'
], function() {
$this->loadRoutesFrom(DIR . '/../Http/Routes/admin.php');
});
it call a prefix to /api/ should be without /api/:
/*
* Routes for the admin
*/
Route::group([
'as' => 'eventcenter.',
'prefix' => 'eventcenter/admin',
// If you want a RESTful module, change this to 'api'
'middleware' => ['web', 'role:admin'],
'namespace' => 'Modules\EventCenter\Http\Controllers\Admin'
], function() {
$this->loadRoutesFrom(DIR . '/../Http/Routes/admin.php');
});
If you modify these lines the 404 error at admin route of the module will be fix.
Hope this help you!
The text was updated successfully, but these errors were encountered:
It create a Admin controller with incorrectly namespace
for example:
php artisan module:make EventCenter
In AdminController.php shows:
namespace Modules\EventCenter\Http\Controllers;
but should be:
namespace Modules\EventCenter\Http\Controllers\Admin;
and it create a wrong admin prefix on routes at ServiceProvider:
/**
* Routes for the admin
/
Route::group([
'as' => 'eventcenter.',
'prefix' => 'api/eventcenter/admin',
// If you want a RESTful module, change this to 'api'
'middleware' => ['web', 'role:admin'],
'namespace' => 'Modules\EventCenter\Http\Controllers\Admin'
], function() {
$this->loadRoutesFrom(DIR . '/../Http/Routes/admin.php');
});
it call a prefix to /api/ should be without /api/:
/*
* Routes for the admin
*/
Route::group([
'as' => 'eventcenter.',
'prefix' => 'eventcenter/admin',
// If you want a RESTful module, change this to 'api'
'middleware' => ['web', 'role:admin'],
'namespace' => 'Modules\EventCenter\Http\Controllers\Admin'
], function() {
$this->loadRoutesFrom(DIR . '/../Http/Routes/admin.php');
});
If you modify these lines the 404 error at admin route of the module will be fix.
Hope this help you!
The text was updated successfully, but these errors were encountered: