8000 Merge routes (#436) · mdbootstrap/adminlte-laravel@44cda7e · GitHub
[go: up one dir, main page]

Skip to content

Commit 44cda7e

Browse files
authored
Merge routes (#436)
* Merge routes * Remove routes.php Co-authored-by: Manel Gavaldà <manel@cyber-duck.co.uk>
1 parent c8618fc commit 44cda7e

File tree

3 files changed

+5
-30
lines changed

3 files changed

+5
-30
lines changed

routes/web.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
use App\Http\Controllers\HomeController;
4+
35
/*
46
|--------------------------------------------------------------------------
57
| Web Routes
@@ -16,8 +18,10 @@
1618
return view('welcome');
1719
});
1820

21+
Route::get('/home', [HomeController::class, 'index']);
22+
1923
Route::group(['middleware' => 'auth'], function () {
20-
// Route::get('/link1', function () {
24+
// Route::get('/link1', function () {
2125
// // Uses Auth Middleware
2226
// });
2327

src/Http/routes.php

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/Providers/AdminLTETemplateServiceProvider.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Acacha\AdminLTETemplateLaravel\Providers;
44

55
use Illuminate\Routing\Router;
6-
use Illuminate\Container\Container;
76
use Illuminate\Support\ServiceProvider;
87
use Creativeorange\Gravatar\Facades\Gravatar;
98
use Acacha\AdminLTETemplateLaravel\Facades\AdminLTE;
@@ -76,10 +75,6 @@ public function boot(Router $router)
7675
{
7776
$router->pushMiddlewareToGroup('web', GuestUser::class);
7877

79-
if (config('adminlte.install_routes', true)) {
80-
$this->defineRoutes();
81-
}
82-
8378
//Publish
8479
$this->publishHomeController();
8580
$this->changeRegisterController();
@@ -102,20 +97,6 @@ public function boot(Router $router)
10297
$this->enableSpatieMenu();
10398
}
10499

105-
/**
106-
* Define the AdminLTETemplate routes.
107-
*/
108-
protected function defineRoutes()
109-
{
110-
if (!$this->app->routesAreCached()) {
111-
$router = app('router');
112-
113-
$router->group(['namespace' => Container::getInstance()->getNamespace().'Http\Controllers'], function () {
114-
require __DIR__.'/../Http/routes.php';
115-
});
116-
}
117-
}
118-
119100
/**
120101
* Publish Home Controller.
121102
*/

0 commit comments

Comments
 (0)
0