-
-
Notifications
You must be signed in to change notification settings - Fork 90
Route
Asep edited this page Jan 26, 2023
·
2 revisions
Each module created already contains two route files Module\Blog\routes\web.php
All routes will be converted into a ladmin module must be registered in the route helper ladmin()->route( Closure )
so that the module can be accessed.
use Illuminate\Support\Facades\Route;
use Modules\Blog\Http\Controllers\ArticleController;
. . .
ladmin()->route(function() {
Route::group(['prefix' => 'blog', 'as' => 'blog.'], function () {
Route::get('/', function () {
return 'Welcome to Blog Module';
})->name('home');
});
/**
* All routes listed here are accessible
* on the Administrator page
* http://localhost:8000/administrator/article
*/
Route::resource('article', ArticleController::class);
});
/**
* All routes listed here, can be accessed
* outside the Administrator page
* * http://localhost:8000/blog
*/
Route::group(['prefix' => 'blog', 'as' => 'blog.'], function () {
Route::get('/', function () {
return 'Welcome to Blog Module';
})->name('blog');
});
- #1 Create Module
- #2 Create Menu
- #3 Route
- #4 Create DataTables
- #5 Template Layout
- #6 Create Model
- #7 Create Command
- #8 Create Component
- #9 Broadcast Notification
- #10 Group Search
- #11 Flashing Message
- #12 Compiling Assets (ViteJs)
- #13 Ladmin Option
- #14 Utility & Helpers
- #15 Vendor Publish
- #16 Custom Style
- #17 Ladmin Awesome
- #18 Make Money