Skip to content

Commit 1ed7f5d

Browse files
committed
getting first data yahoo
1 parent e1cb17a commit 1ed7f5d

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

bootstrap/app.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,10 @@
6464
// App\Http\Middleware\ExampleMiddleware::class
6565
// ]);
6666

67-
// $app->routeMiddleware([
67+
$app->routeMiddleware([
6868
// 'auth' => App\Http\Middleware\Authenticate::class,
69-
// ]);
69+
'jwt-auth' => \Tymon\JWTAuth\Http\Middleware\Authenticate::class,
70+
]);
7071

7172
/*
7273
|--------------------------------------------------------------------------

routes/web.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,13 @@
1515
return $router->app->version();
1616
});
1717

18-
$router->post('/auth/login', 'AuthController@postLogin');
18+
$router->post('/auth/login', 'AuthController@postLogin');
19+
20+
$router->group(['middleware' => 'jwt-auth'], function() use ($router)
21+
{
22+
$router->get('/test', function() {
23+
return response()->json([
24+
'message' => 'Hello World!',
25+
]);
26+
});
27+
});

0 commit comments

Comments
 (0)