From 53e13f4f5bab2d977a9079b48c6b539bcb9e7d18 Mon Sep 17 00:00:00 2001 From: satori Date: Wed, 27 Jul 2022 02:47:39 +0700 Subject: [PATCH] add cors middleware to public --- routes/web.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index 743fafe..192ef4d 100644 --- a/routes/web.php +++ b/routes/web.php @@ -4,7 +4,7 @@ $router->get('/', function () use ($router) { return $router->app->version(); }); -$router->group(['prefix'=>'api'], function () use ($router) { +$router->group(['prefix'=>'api', 'middleware' => 'cors'], function () use ($router) { $router->post('/login', 'AuthController@login'); $router->post('/menu/add', 'MenuController@add');