Documentation Index
Fetch the complete documentation index at: https://kawax.biz/llms.txt
Use this file to discover all available pages before exploring further.
Laravel イベント
Events のイベントクラスを各所に仕込んでいるのでログやデバッグに活用できます。
フック でも似たことができますが、フックがない場所にも仕込めます。
src/
├── Events/
│ ├── Client/
│ │ ├── ClientStarted.php
│ │ ├── ToolCall.php
│ │ └── PingPong.php
│ ├── JsonRpc/
│ │ ├── MessageReceived.php
│ │ ├── MessageSending.php
│ │ └── ResponseReceived.php
│ ├── Process/
│ │ └── ProcessStarted.php
│ └── Session/
│ ├── CreateSession.php
│ ├── MessageSend.php
│ ├── MessageSendAndWait.php
│ ├── SessionEventReceived.php
│ └── ResumeSession.php
例えば少し時間のかかる処理をキューや defer に投げることができます。この Copilot::run() の結果は直接受け取れませんが、代わりに MessageSendAndWait イベントのリスナーで受け取ることができます。
dispatch(fn() => Copilot::run(''));
use function Illuminate\Support\defer;
defer(fn() => Copilot::run(''));