Skip to content

Commit

Permalink
feat: update laravel dir structure
Browse files Browse the repository at this point in the history
  • Loading branch information
chipslays committed Feb 17, 2023
1 parent bd1f431 commit c13256f
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 8 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
{
public string $type = 'ping';

protected array $rules = [];

public function handle(Connection $connection, Payload $payload, Server $server)
{
$this->reply('pong');
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions examples/laravel/server.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,20 @@
server()->setLogFile(__DIR__ . '/server.log');

// load event classes
server()->autoloadEvents(__DIR__ . '/app/events');
server()->autoloadEvents(__DIR__ . '/core/events');

// load server system events
foreach (glob(__DIR__ . '/app/server/*.php') as $file) {
// load server actions
foreach (glob(__DIR__ . '/core/actions/*.php') as $file) {
require_once $file;
}

// load timers
foreach (glob(__DIR__ . '/app/timers/*.php') as $file) {
foreach (glob(__DIR__ . '/core/timers/*.php') as $file) {
require_once $file;
}

// load app kernel (server start point)
require_once __DIR__ . '/app/kernel.php';
// load handler (server start point)
require_once __DIR__ . '/core/handler.php';

// start server and handle events
server()->start();

0 comments on commit c13256f

Please sign in to comment.