Skeleton is ready

This commit is contained in:
2026-01-05 16:33:20 +04:00
commit eeaf43ab5d
89 changed files with 2704 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
<?php
declare(strict_types=1);
namespace App\Kernel\Feature;
trait HasCommandsList
{
public function registerCommands(): void
{
if (isset($this->commandsList) && method_exists($this, 'commands')) {
$this->commands($this->commandsList);
}
}
}

View File

@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
namespace App\Kernel\Feature;
use Illuminate\Support\Facades\Event;
trait HasEventListeners
{
public function registerListeners(): void
{
if (isset($this->eventListeners)) {
/**
* @var string $event
* @var array<int,string> $listeners
*/
foreach ($this->eventListeners as $event => $listeners) {
foreach ($listeners as $listener) {
Event::listen($event, $listener);
}
}
}
}
}