Fix the module stubs and sample module for admin closes #201
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace $MODULE_NAMESPACE$\$STUDLY_NAME$\Http\Controllers;
|
||||
namespace $MODULE_NAMESPACE$\$STUDLY_NAME$\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
|
||||
# This is the admin path. Comment this out if you don't have
|
||||
# an admin panel component.
|
||||
# This is the admin path. Comment this out if you don't have an admin panel component.
|
||||
Route::group([], function () {
|
||||
Route::get('/', 'AdminController@index');
|
||||
});
|
||||
|
||||
@@ -47,7 +47,7 @@ class $CLASS$ extends ServiceProvider
|
||||
// $this->moduleSvc->addFrontendLink('$STUDLY_NAME$', '/$LOWER_NAME$', '', $logged_in=true);
|
||||
|
||||
// Admin links:
|
||||
$this->moduleSvc->addAdminLink('$STUDLY_NAME$', '/$LOWER_NAME$/admin');
|
||||
$this->moduleSvc->addAdminLink('$STUDLY_NAME$', '/admin/$LOWER_NAME$');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -73,7 +73,7 @@ class $CLASS$ extends ServiceProvider
|
||||
*/
|
||||
Route::group([
|
||||
'as' => '$LOWER_NAME$.',
|
||||
'prefix' => 'api/$LOWER_NAME$/admin',
|
||||
'prefix' => 'admin/$LOWER_NAME$',
|
||||
// If you want a RESTful module, change this to 'api'
|
||||
'middleware' => ['web', 'role:admin'],
|
||||
'namespace' => '$MODULE_NAMESPACE$\$STUDLY_NAME$\Http\Controllers\Admin'
|
||||
|
||||
Reference in New Issue
Block a user