Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_api_initial
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3dfc7e6b
authored
Apr 22, 2020
by
叶明星
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
优化路由
parent
9fd8976f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
13 deletions
app/Http/routes.php
bootstrap/app.php
app/Http/routes.php
View file @
3dfc7e6b
...
...
@@ -11,16 +11,9 @@
|
*/
$app
->
get
(
'/'
,
function
()
use
(
$app
)
{
return
$app
->
version
();
});
$app
->
group
([
'middleware'
=>
'login'
,
'namespace'
=>
'App\Http\Controllers'
],
function
()
use
(
$app
)
{
$app
->
get
(
'/'
,
function
()
use
(
$app
){
$app
->
get
(
'/'
,
function
()
use
(
$app
){
return
$app
->
version
();
});
$app
->
get
(
'/test/index'
,
'ExampleController@index'
);
});
$app
->
get
(
'/test/index'
,
'ExampleController@index'
);
bootstrap/app.php
View file @
3dfc7e6b
...
...
@@ -66,12 +66,13 @@ $app->singleton(
$app
->
middleware
([
// App\Http\Middleware\ExampleMiddleware::class
App\Http\Middleware\UniqueMiddleware
::
class
,
App\Http\Middleware\CheckLogin
::
class
]);
$app
->
routeMiddleware
([
// 'auth' => App\Http\Middleware\Authenticate::class,
'login'
=>
App\Http\Middleware\CheckLogin
::
class
]);
//
$app->routeMiddleware([
//
//
'auth' => App\Http\Middleware\Authenticate::class,
//
'login' => App\Http\Middleware\CheckLogin::class
//
]);
/*
|--------------------------------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment