<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>itechblog</author_name>
  <author_url>https://blog.hatena.ne.jp/itechblog/</author_url>
  <blog_title>Webエンジニアのメモ帳</blog_title>
  <blog_url>https://itechblog.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>Laravelにはイベント・リスナという機能があり、簡潔に書くと以下のようなものです。 app/Providers/EventServiceProviderに以下のように加筆しておく protected $listen = [ 'App\Events\Event' =&gt;[ 'App\Listeners\Lister' ] ]; Eventを以下のような書き方で発火させると、Listnerクラスのhandle()メソッドが実行される event(new Event()); すでにイベント・リスナの解説をしているページは多くありますが、分量が多くて分かりにくく感じたので、簡潔にまとめてみました。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fitechblog.hatenablog.com%2Fentry%2F2024%2F03%2F21%2F222629&quot; title=&quot;【Laravel】イベントとリスナについて超簡単に解説 - Webエンジニアのメモ帳&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-03-21 22:26:29</published>
  <title>【Laravel】イベントとリスナについて超簡単に解説</title>
  <type>rich</type>
  <url>https://itechblog.hatenablog.com/entry/2024/03/21/222629</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
