Skip to content

Commit

Permalink
feat: fit new version of router package
Browse files Browse the repository at this point in the history
  • Loading branch information
storyn26383 committed Sep 13, 2023
1 parent f41aec7 commit 9fedaaa
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions app/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

declare(strict_types=1);

namespace App\Providers;

use SwooleTW\Hyperf\Foundation\Support\Providers\RouteServiceProvider as BaseServiceProvider;

class RouteServiceProvider extends BaseServiceProvider
{
/**
* The route files for the application.
*/
protected array $routes = [
BASE_PATH . '/routes/web.php',
BASE_PATH . '/routes/api.php',
];
}
1 change: 1 addition & 0 deletions config/autoload/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@

'providers' => [
SwooleTW\Hyperf\Foundation\Providers\FoundationServiceProvider::class,
App\Providers\RouteServiceProvider::class,
App\Providers\AppServiceProvider::class,
App\Providers\EventServiceProvider::class,
],
Expand Down
1 change: 0 additions & 1 deletion config/autoload/dependencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*/
return [
Psr\EventDispatcher\EventDispatcherInterface::class => SwooleTW\Hyperf\Foundation\Event\EventDispatcherFactory::class,
Hyperf\HttpServer\Router\DispatcherFactory::class => SwooleTW\Hyperf\Router\DispatcherFactory::class,
Hyperf\Logger\LoggerFactory::class => SwooleTW\Hyperf\Log\Adapter\LogFactoryAdapter::class,
Hyperf\Validation\Middleware\ValidationMiddleware::class => App\Http\Middleware\ValidationMiddleware::class,
SwooleTW\Hyperf\Foundation\Console\Contracts\Kernel::class => App\Console\Kernel::class,
Expand Down

0 comments on commit 9fedaaa

Please sign in to comment.