jqh 4 năm trước cách đây
mục cha
commit
8ede59556c
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      src/Application.php

+ 3 - 1
src/Application.php

@@ -143,7 +143,9 @@ class Application
     {
         $this->withConfig($app);
 
-        Admin::registerApiRoutes($this->getApiRoutePrefix($app));
+        $this->loadRoutesFrom(function () use ($app) {
+            Admin::registerApiRoutes($this->getApiRoutePrefix($app));
+        }, $app);
 
         if (is_file($routes = admin_path('routes.php'))) {
             $this->loadRoutesFrom($routes, $app);