Implement commands
This commit is contained in:
@ -2,16 +2,23 @@
|
||||
|
||||
namespace App;
|
||||
|
||||
use App\Console\TestCommand;
|
||||
use App\Controller\HelloWorldController;
|
||||
use Ardent\Undercurrent\Console\CommandsConfig;
|
||||
use Ardent\Undercurrent\Container\ContainerInterface;
|
||||
use Ardent\Undercurrent\Http\RoutesConfig;
|
||||
use Ardent\Undercurrent\Kernel\BaseKernel;
|
||||
|
||||
class Kernel extends BaseKernel
|
||||
{
|
||||
protected function dependencies(ContainerInterface $container): void
|
||||
{
|
||||
$this->addControllers($container, [
|
||||
HelloWorldController::class,
|
||||
]);
|
||||
$routes = new RoutesConfig();
|
||||
$routes->add(HelloWorldController::class);
|
||||
$this->addControllers($container, $routes);
|
||||
|
||||
$commands = new CommandsConfig();
|
||||
$commands->add(TestCommand::class);
|
||||
$this->addCommands($container, $commands);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user