{"id":12008,"date":"2023-10-15T07:00:16","date_gmt":"2023-10-14T22:00:16","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=12008"},"modified":"2023-09-29T01:48:31","modified_gmt":"2023-09-28T16:48:31","slug":"%e3%83%a1%e3%83%bc%e3%83%ab%e9%80%81%e4%bf%a1%e3%81%ab%e5%a4%b1%e6%95%97%e3%81%97%e3%81%9f%e3%82%a2%e3%83%89%e3%83%ac%e3%82%b9%e3%82%92%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=12008","title":{"rendered":"\u3010Laravel\u3011\u30e1\u30fc\u30eb\u9001\u4fe1\u306b\u5931\u6557\u3057\u305f\u30a2\u30c9\u30ec\u30b9\u3092\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3067\u62d2\u5426\u3059\u308b"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u30b5\u30a4\u30c8\u306e\u904b\u55b6\u3092\u3057\u3066\u3044\u308b\u3068\u30db\u30f3\u30c8\u306b\u3044\u308d\u3044\u308d\u306a\u3068\u3053\u308d\u3067\u4fee\u6b63\u304c\u5fc5\u8981\u306a\u90e8\u5206\u304c\u51fa\u3066\u304f\u308b\u3068\u306f\u601d\u3046\u306e\u3067\u3059\u304c\u3001\u3053\u306e\u9593\u56f0\u3063\u305f\u306e\u304c\u4eca\u56de\u306e\u30c6\u30fc\u30de\u306b\u3057\u305f\u3001<\/p>\n<p><strong style=\"font-size: 35px;\">\uff08\u5b9f\u306f\uff09\u30e1\u30fc\u30eb\u304c\u9001\u4fe1\u3055\u308c\u3066\u3044\u306a\u304b\u3063\u305f \ud83d\ude29<\/strong><\/p>\n<p>\u3068\u3044\u3046\u4e0d\u5177\u5408\u3067\u3057\u305f\ud83d\udca6<\/p>\n<p>\u3068\u3044\u3046\u306e\u3082\u3001<code>Laravel<\/code>\u5074\u3067\u306f\u30a8\u30e9\u30fc\u3082\u51fa\u305a\u9001\u4fe1\u3067\u304d\u308b\u3093\u3067\u3059\u304c\u3001\u9001\u4fe1\u5148\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30bd\u30d5\u30c8\u306a\u3069\u304c\u53d7\u53d6\u3092\u62d2\u5426\u3057\u3066\u3044\u308b\u5834\u5408\u304c\u3042\u308a\u3001\u305d\u3093\u306a\u5834\u5408\u306f<code>Laravel<\/code>\u5074\u3067\u306f\u628a\u63e1\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u305a\u3001\u30e1\u30fc\u30eb\u30ed\u30b0\u3092\u898b\u3066\u3084\u3063\u3068\u5185\u5bb9\u304c\u308f\u304b\u308b\u3068\u3044\u3046\u3082\u306e\u3067\u3057\u305f\u3002\uff08<code>gmail<\/code>\u306e<code>spf<\/code>\u304c\u5fc5\u8981\u306b\u306a\u3063\u305f\u3001\u3068\u304b\u3082\u3067\u3059\u306d\uff09<\/p>\n<p>\u305d\u3057\u3066\u3001\u3069\u3046\u3084\u3089<code>postfix<\/code>\u3092\u4f7f\u3048\u3070\u901a\u77e5\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u81ea\u5206\u306b\u9001\u4fe1\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u308b\u3088\u3046\u3067\u3059\u304c\u3001\u30e1\u30fc\u30eb\u9001\u4fe1\u3067\u304d\u306a\u3044\u554f\u984c\u306e\u6839\u672c\u89e3\u6c7a\u3067\u304d\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u305d\u3053\u3067\u2757<\/p>\n<p>\u4eca\u56de\u306f\u3001\u30e1\u30fc\u30eb\u30ed\u30b0\u3092\u5b9a\u671f\u7684\u306b\u30c1\u30a7\u30c3\u30af\u3057\u3066\u300c<strong>\u9001\u4fe1\u306b\u5931\u6557\u3057\u305f\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9<\/strong>\u300d\u3092\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u8caf\u3081\u3066\u304a\u304d\u3001\u6b21\u56de\u306f\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3067\u30a8\u30e9\u30fc\u3092\u51fa\u3059\u3088\u3046\u306b\u3057\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002\uff08\u3064\u307e\u308a\u3001\u672c\u4eba\u306b\u300c<strong>\u524d\u306e\u30e1\u30fc\u30eb\u9001\u4fe1\u5931\u6557\u3057\u305f\u304b\u3089\u30c0\u30e1\u3088<\/strong>\u300d\u3068\u4f1d\u3048\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u308f\u3051\u3067\u3059\uff09<\/p>\n<p>\u305c\u3072\u4f55\u304b\u306e\u53c2\u8003\u306b\u306a\u308a\u307e\u3057\u305f\u3089\u5b09\u3057\u3044\u3067\u3059\u3002\ud83d\ude0a\u2728<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4445 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2.png\" alt=\"\" width=\"370\" height=\"310\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2.png 370w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2-300x251.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/>\u300c<code>ChatGPT<\/code>\u304c\u3044\u3044\u56de\u7b54\u3057\u305f\u3068\u304d\u306f<br \/>\n\u300e\u30ca\u30a4\u30b9\uff01\u300f<br \/>\n\u3068\u8a00\u3063\u3066\u304a\u3060\u3066\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\ud83d\ude02\u300d<\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Laravel 10.x<\/p>\n<h1>\u5b9f\u88c5\u3059\u308b\u624b\u9806<\/h1>\n<p>\u307e\u305a\u306f\u4eca\u56de\u306e\u5b9f\u88c5\u3092\u3059\u308b\u624b\u9806\u3092\u307e\u3068\u3081\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<ol>\n<li>\u30e1\u30fc\u30eb\u30ed\u30b0\u304b\u3089\u6700\u5f8c\u306e\u4e00\u90e8\u3092\u5207\u308a\u53d6\u3063\u3066 Laravel \u5074\u306e\u30c6\u30ad\u30b9\u30c8\u306b\u4fdd\u5b58\u3059\u308b\uff08\u203b\uff09<\/li>\n<li>Laravel \u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u554f\u984c\u306e\u3042\u308b\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97<\/li>\n<li>\u305d\u308c\u3089\u3092 DB \u3078\u4fdd\u5b58<\/li>\n<li>\u4fdd\u5b58\u3057\u305f\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u4f7f\u3063\u3066\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u65bd\u3059\u308b<\/li>\n<\/ol>\n<p>\u203b \u74b0\u5883\u306b\u3088\u308b\u304b\u3082\u3067\u3059\u304c\u3001\u79c1\u306e\u5834\u5408\u3060\u3068<code>postfix<\/code>\u306e\u30e1\u30fc\u30eb\u30ed\u30b0\u306f\u7ba1\u7406\u8005\u6a29\u9650\u3067\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u3067\u3001\u4e00\u65e6<code>Laravel<\/code>\u306b\u79fb\u3059\u4f5c\u696d\u3092\u3044\u308c\u3066\u3044\u307e\u3059<\/p>\n<p>\u3067\u306f\u3001\u4eca\u56de\u3082\u697d\u3057\u3093\u3067\u3084\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u2757<\/p>\n<h1>DB \u307e\u308f\u308a\u3092\u3064\u304f\u308b<\/h1>\n<p>\u307e\u305a\u306f\u3001DB\u307e\u308f\u308a\uff08\u30e2\u30c7\u30eb\uff06\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\uff09\u3067\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\n<pre><strong>php artisan make:model FailedEmail -m<\/strong><\/pre>\n<\/div>\n<p>\u3059\u308b\u3068\u3001\u30e2\u30c7\u30eb\u3068\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u306e\uff12\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u305d\u308c\u305e\u308c\u4e2d\u8eab\u3092\u6b21\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p><strong>app\/Models\/FailedEmail.php<\/strong><\/p>\n<div>\n<pre><strong>&lt;?php<\/strong>\r\n\r\n<strong>namespace App\\Models;<\/strong>\r\n\r\n<strong>use Illuminate\\Database\\Eloquent\\Factories\\HasFactory;<\/strong>\r\n<strong>use Illuminate\\Database\\Eloquent\\Model;<\/strong>\r\n\r\n<strong>class FailedEmail extends Model<\/strong>\r\n<strong>{<\/strong>\r\n<strong>    use HasFactory;<\/strong>\r\n\r\n<strong>    protected $fillable = [<\/strong>\r\n<strong>        'email',<\/strong>\r\n<strong>        'status',<\/strong>\r\n<strong>        'failed_at',<\/strong>\r\n<strong>    ];<\/strong>\r\n<strong>}<\/strong><\/pre>\n<\/div>\n<p><strong>database\/migrations\/****_**_**_******_create_failed_emails_table.php<\/strong><\/p>\n<div>\n<pre><strong>&lt;?php<\/strong>\r\n\r\n<strong>use Illuminate\\Database\\Migrations\\Migration;<\/strong>\r\n<strong>use Illuminate\\Database\\Schema\\Blueprint;<\/strong>\r\n<strong>use Illuminate\\Support\\Facades\\Schema;<\/strong>\r\n\r\n<strong>return new class extends Migration<\/strong>\r\n<strong>{<\/strong>\r\n<strong>    \/**<\/strong>\r\n<strong>     * Run the migrations.<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    public function up(): void<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        Schema::create('failed_emails', function (Blueprint $table) {<\/strong>\r\n<strong>            $table-&gt;id();<\/strong>\r\n<strong>            $table-&gt;string('email')-&gt;unique()-&gt;comment('\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9');<\/strong>\r\n<strong>            $table-&gt;string('status')-&gt;comment('\u30b9\u30c6\u30fc\u30bf\u30b9'); \/\/ App\\Enums\\FailedEmailStatus<\/strong>\r\n<strong>            $table-&gt;dateTime('failed_at')-&gt;comment('\u30e1\u30fc\u30eb\u9001\u4fe1\u306b\u5931\u6557\u3057\u305f\u65e5\u6642');<\/strong>\r\n<strong>            $table-&gt;timestamps();<\/strong>\r\n<strong>        });<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * Reverse the migrations.<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    public function down(): void<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        Schema::dropIfExists('failed_emails');<\/strong>\r\n<strong>    }<\/strong>\r\n<strong>};<\/strong><\/pre>\n<p>\u3067\u306f\u3001\u3053\u306e\u72b6\u614b\u3067\u30c6\u30fc\u30d6\u30eb\u3092\u8ffd\u52a0\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<\/div>\n<div>\n<pre><strong>php artisan migrate<\/strong><\/pre>\n<\/div>\n<p>\u3059\u308b\u3068\u3001\u5b9f\u969b\u306e\u30c6\u30fc\u30d6\u30eb\u306f\u3053\u3046\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12017\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/09\/laravel_failed_email_rule_5.png\" alt=\"\" width=\"462\" height=\"284\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/09\/laravel_failed_email_rule_5.png 462w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/09\/laravel_failed_email_rule_5-300x184.png 300w\" sizes=\"auto, (max-width: 462px) 100vw, 462px\" \/><\/p>\n<h1>PostFix \u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u3067 Enum \u3092\u3064\u304f\u308b<\/h1>\n<p><code>postfix<\/code>\u304c\u9001\u4fe1\u3057\u305f\u3068\u304d\u306b\u30e1\u30fc\u30eb\u30ed\u30b0\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3059\u304c\u3001\u305d\u306e\u4e2d\u306b\u306f\u300c<strong>status=*****<\/strong>\u300d\u3068\u3044\u3046\u90e8\u5206\u304c\u542b\u307e\u308c\u3066\u3044\u3066\u3001\u3053\u308c\u3067\u30e1\u30fc\u30eb\u9001\u4fe1\u306e\u7d50\u679c\u3092\u77e5\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001\u305d\u308c\u3089\uff08\u4eca\u56de\u306f\u4e3b\u8981\u306a\u3082\u306e\u3060\u3051\uff09\u3092<code>Enum<\/code>\u3067\u300c<strong>\u30b9\u30c6\u30fc\u30bf\u30b9<\/strong>\u300d\u306e\u7ba1\u7406\u3092\u3057\u3084\u3059\u304f\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p><strong>app\/Enums\/FailedEmailStatus.php<\/strong><\/p>\n<div>\n<pre><strong>&lt;?php<\/strong>\r\n\r\n<strong>namespace App\\Enums;<\/strong>\r\n\r\n<strong>enum FailedEmailStatus: string<\/strong>\r\n<strong>{<\/strong>\r\n<strong>    case sent = 'sent';         \/\/ \u6210\u529f<\/strong>\r\n<strong>    case deferred = 'deferred'; \/\/ \u9045\u5ef6<\/strong>\r\n<strong>    case bounced = 'bounced';   \/\/ \u5931\u6557<\/strong>\r\n<strong>    case rejected = 'rejected'; \/\/ \u62d2\u5426<\/strong>\r\n\r\n<strong>    public static function values()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        return array_column(self::cases(), 'value');<\/strong>\r\n<strong>    }<\/strong>\r\n<strong>}<\/strong><\/pre>\n<\/div>\n<h1>\u72ec\u81ea Artisan \u30b3\u30de\u30f3\u30c9\u3092\u3064\u304f\u308b<\/h1>\n<p>\u7d9a\u3044\u3066\u3001\u30e1\u30fc\u30eb\u30ed\u30b0\u304b\u3089\u300c<strong>\u554f\u984c\u306e\u3042\u308b\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9<\/strong>\u300d\u3092\u53d6\u5f97\u3059\u308b\u90e8\u5206\u3067\u3059\u3002\u3053\u308c\u306f\u3001\u72ec\u81ea\u306e<code>Artisan<\/code>\u30b3\u30de\u30f3\u30c9\u3067\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\n<pre><strong>php artisan make:command ExtractFailedEmailCommand<\/strong><\/pre>\n<\/div>\n<p>\u3059\u308b\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p><strong>app\/Console\/Commands\/ExtractFailedEmailCommand.php<\/strong><\/p>\n<div>\n<pre><strong>&lt;?php<\/strong>\r\n\r\n<strong>namespace App\\Console\\Commands;<\/strong>\r\n\r\n<strong>use App\\Enums\\FailedEmailStatus;<\/strong>\r\n<strong>use App\\Models\\FailedEmail;<\/strong>\r\n<strong>use Carbon\\Carbon;<\/strong>\r\n<strong>use Illuminate\\Console\\Command;<\/strong>\r\n\r\n<strong>class ExtractFailedEmailCommand extends Command<\/strong>\r\n<strong>{<\/strong>\r\n<strong>    \/**<\/strong>\r\n<strong>     * The name and signature of the console command.<\/strong>\r\n<strong>     *<\/strong>\r\n<strong>     * @var string<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    protected $signature = 'extract:failed_email';<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * The console command description.<\/strong>\r\n<strong>     *<\/strong>\r\n<strong>     * @var string<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    protected $description = '\u30e1\u30fc\u30eb\u9001\u4fe1\u306b\u5931\u6557\u3057\u305f\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u62bd\u51fa\u3059\u308b\u30b3\u30de\u30f3\u30c9';<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * Execute the console command.<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    public function handle()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $file_path = storage_path('logs\/maillog_copy.txt'); \/\/ cron\u3067\u30b3\u30d4\u30fc\u3057\u305f\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9<\/strong>\r\n<strong>        $lines = file($file_path, FILE_IGNORE_NEW_LINES);<\/strong>\r\n\r\n<strong>        foreach ($lines as $line) {<\/strong>\r\n\r\n<strong>            $email = $this-&gt;parseToEmail($line);<\/strong>\r\n<strong>            $status = $this-&gt;parseStatus($line);<\/strong>\r\n<strong>            $failed_at = $this-&gt;parseDateTime($line);<\/strong>\r\n\r\n<strong>            if (! is_null($email) &amp;&amp; ! is_null($status) &amp;&amp; $failed_at instanceof Carbon) {<\/strong>\r\n\r\n<strong>                if (in_array($status, ['deferred', 'bounced', 'rejected'])) {<\/strong>\r\n\r\n<strong>                    $failed_email = FailedEmail::firstOrNew(['email' =&gt; $email]);<\/strong>\r\n<strong>                    $failed_email-&gt;email = $email;<\/strong>\r\n<strong>                    $failed_email-&gt;status = $status;<\/strong>\r\n<strong>                    $failed_email-&gt;failed_at = $failed_at;<\/strong>\r\n<strong>                    $failed_email-&gt;save();<\/strong>\r\n\r\n<strong>                    $this-&gt;warn('Saved! `'. $email .'`');<\/strong>\r\n\r\n<strong>                } else if ($status === 'sent') {<\/strong>\r\n\r\n<strong>                    FailedEmail::where('email', $email)-&gt;delete(); \/\/ \u9001\u4fe1\u306b\u6210\u529f\u3057\u305f\u3089\u524a\u9664<\/strong>\r\n\r\n<strong>                    $this-&gt;info('Deleted! `'. $email .'`');<\/strong>\r\n\r\n<strong>                }<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n\r\n<strong>    private function parseToEmail(string $text): ?string<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $pattern = '\/to=&lt;(.+?)&gt;,\/';<\/strong>\r\n<strong>        preg_match($pattern, $text, $matches);<\/strong>\r\n\r\n<strong>        return $matches[1] ?? null;<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    private function parseStatus(string $text): ?string<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $failed_email_values = FailedEmailStatus::values();<\/strong>\r\n<strong>        $pattern = '\/status=('. implode('|', $failed_email_values) . ') \/';<\/strong>\r\n<strong>        preg_match($pattern, $text, $matches);<\/strong>\r\n\r\n<strong>        return $matches[1] ?? null;<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    private function parseDateTime(string $text): ?Carbon<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $pattern = '\/^(\\w{3} \\d{1,2} \\d{2}:\\d{2}:\\d{2}) \/';<\/strong>\r\n\r\n<strong>        if(preg_match($pattern, $text, $matches)) {<\/strong>\r\n\r\n<strong>            return Carbon::createFromFormat('M d H:i:s', $matches[1]);<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        return null;<\/strong>\r\n<strong>    }<\/strong>\r\n<strong>}<\/strong><\/pre>\n<\/div>\n<p>\u3053\u308c\u3067\u3001<code>php artisan extract:failed_email<\/code>\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u30e1\u30fc\u30eb\u30ed\u30b0\u306e\u4e2d\u304b\u3089\u300c<strong>\u9001\u4fe1\u306b\u5931\u6557\u3057\u305f\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9<\/strong>\u300d\u304c\u53d6\u5f97\uff06\u4fdd\u5b58\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<h1>\u72ec\u81ea\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30fb\u30eb\u30fc\u30eb\u3092\u3064\u304f\u308b<\/h1>\n<p>\u300c<strong>\u5931\u6557\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9<\/strong>\u300d\u3092\u53d6\u5f97\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u306e\u3067\u3001\u6b21\u306f\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30fb\u30eb\u30fc\u30eb\u306e\u4f5c\u6210\u3067\u3059\u3002<\/p>\n<p>\u3064\u307e\u308a\u3001\u300c<strong>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u304c\u767b\u9332\u3055\u308c\u3066\u3044\u308c\u3070\u3001\u5931\u6557\u304c\u3042\u3063\u305f\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9<\/strong>\u300d\u3068\u3044\u3046\u3053\u3068\u306a\u306e\u3067\u3001\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u901a\u904e\u3067\u304d\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\n<pre><strong>php artisan make:rule IsSendableEmailAddress<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>app\/Rules\/IsSendableEmailAddress.php<\/strong><\/p>\n<\/div>\n<div>\n<pre>&lt;?php\r\n\r\nnamespace App\\Rules;\r\n\r\n<strong>use App\\Models\\FailedEmail;<\/strong>\r\nuse Closure;\r\nuse Illuminate\\Contracts\\Validation\\ValidationRule;\r\n\r\nclass IsSendableEmailAddress implements ValidationRule\r\n{\r\n    \/**\r\n     * Run the validation rule.\r\n     *\r\n     * @param  \\Closure(string): \\Illuminate\\Translation\\PotentiallyTranslatedString  $fail\r\n     *\/\r\n    <strong>public function validate(string $attribute, mixed $value, Closure $fail): void<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $exists = FailedEmail::where('email', $value)-&gt;exists();<\/strong>\r\n\r\n<strong>        if ($exists === true) {<\/strong>\r\n\r\n<strong>            $fail('\u4ee5\u524d\u306b\u30e1\u30fc\u30eb\u9001\u4fe1\u306b\u5931\u6557\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u6709\u52b9\u3067\u306f\u3042\u308a\u307e\u305b\u3093');<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<\/div>\n<p>\u3053\u308c\u3067\u4f5c\u696d\u306f\u5b8c\u4e86\u3067\u3059\u2757<br \/>\n\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\ud83d\ude0a\u2728<\/p>\n<h1>\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u30c6\u30b9\u30c8\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\n\u307e\u305a\u306f\u300c<strong>\u9001\u4fe1\u306b\u5931\u6557\u3057\u305f\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u53d6\u5f97\uff06\u4fdd\u5b58<\/strong>\u300d\u3067\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u524d\u306b\u30c6\u30b9\u30c8\u7528\u306e\u30e1\u30fc\u30eb\u30ed\u30b0\u3092\u7528\u610f\u3057\u307e\u3059\u3002\uff08\u4ee5\u4e0b\u306f<code>ChatGPT<\/code>\u3067\u4f5c\u3063\u305f\u30c6\u30b9\u30c8\u7528\u30e1\u30fc\u30eb\u30ed\u30b0\u3067\u3059\uff09<\/p>\n<p><strong>\/var\/log\/mail.log<\/strong><\/p>\n<div>\n<pre><strong>Sep 16 09:00:00 mailserver1.example.com postfix\/smtpd[1234]: connect from localhost[127.0.0.1], status=sent<\/strong>\r\n<strong>Sep 16 09:00:01 mailserver1.example.com postfix\/smtpd[1234]: ABC123456789: client=localhost[127.0.0.1], status=deferred<\/strong>\r\n<strong>Sep 16 09:00:02 mailserver1.example.com postfix\/pickup[5678]: DEF987654321: uid=48 from=&lt;user1@example.com&gt;, status=bounced<\/strong>\r\n<strong>Sep 16 09:00:03 mailserver1.example.com postfix\/cleanup[9876]: DEF987654321: message-id=&lt;12345abcdef@example.com&gt;, status=rejected<\/strong>\r\n<strong>Sep 16 09:00:04 mailserver1.example.com postfix\/qmgr[9876]: DEF987654321: from=&lt;user1@example.com&gt;, size=9876, nrcpt=1 (queue active), status=sent<\/strong>\r\n<strong>Sep 16 09:00:05 mailserver1.example.com postfix\/smtp[4321]: DEF987654321: to=&lt;user2@example.com&gt;, relay=mail.example.net[192.168.1.2]:25, delay=1.5, delays=0.04\/0\/0.14\/1.3, dsn=2.0.0, status=deferred<\/strong>\r\n<strong>Sep 16 09:00:06 mailserver1.example.com postfix\/qmgr[9876]: DEF987654321: removed, status=sent<\/strong>\r\n<strong>Sep 16 09:04:08 mailserver1.example.com postfix\/qmgr[9876]: GHI654321098: from=&lt;user1@example.com&gt;, size=8765, nrcpt=1 (queue active), status=bounced<\/strong>\r\n<strong>Sep 16 09:04:09 mailserver1.example.com postfix\/smtp[9876]: connect to mail.example.org[203.0.113.1]:25: Connection timed out, status=rejected<\/strong>\r\n<strong>Sep 16 09:04:10 mailserver1.example.com postfix\/smtp[9876]: GHI654321098: host mail.example.net[192.168.1.2] said: 450 4.7.1 &lt;user3@example.net&gt;: Recipient address rejected: Mail from &lt;192.168.1.3&gt; was refused due to the sender IP found in ERS-QIL. For details, query the IP reputation on https:\/\/example.com\/ers\/. (in reply to RCPT TO command), status=deferred<\/strong><\/pre>\n<\/div>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\uff08\u3054\u81ea\u8eab\u306e\u30d1\u30b9\u306b\u5408\u308f\u305b\u3066\uff09\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\n<pre><strong>tail -n 100 \/var\/log\/mail.log &gt; \/path\/to\/laravel\/storage\/logs\/maillog_copy.txt &amp;&amp; php \/path\/to\/laravel\/artisan extract:failed_email<\/strong><\/pre>\n<\/div>\n<p>\u306a\u304a\u3001\u3053\u306e\u30b3\u30de\u30f3\u30c9\u306f<code>crontab<\/code>\u3067\u5b9a\u671f\u5b9f\u884c\u3059\u308b\u3053\u3068\u3092\u60f3\u5b9a\u3057\u305f\u3082\u306e\u3067\u3059\u3002<br \/>\n\u5b9f\u969b\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308b\u3068\u3044\u3044\u3067\u3057\u3087\u3046\u3002\uff08\u3053\u306e\u4f8b\u306f30\u5206\u3054\u3068\u306e\u5b9f\u884c\u3067\u3059\uff09<\/p>\n<div>\n<pre><strong>*\/30 * * * * tail -n 100 \/var\/log\/mail.log &gt; \/path\/to\/laravel\/storage\/logs\/maillog_copy.txt &amp;&amp; php \/path\/to\/laravel\/artisan extract:failed_email<\/strong><\/pre>\n<\/div>\n<p>\u3067\u306f\u5b9f\u969b\u306f\u3069\u3046\u306a\u3063\u305f\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u7d50\u679c\u306f\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12012\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/09\/laravel_failed_email_rule_1.png\" alt=\"\" width=\"280\" height=\"268\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u3046\u307e\u304f\u52d5\u3044\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u65b9\u3082\u78ba\u8a8d\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3069\u3046\u306a\u3063\u305f\u3067\u3057\u3087\u3046\u304b\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12014\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/09\/laravel_failed_email_rule_2.png\" alt=\"\" width=\"541\" height=\"400\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/09\/laravel_failed_email_rule_2.png 541w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/09\/laravel_failed_email_rule_2-300x222.png 300w\" sizes=\"auto, (max-width: 541px) 100vw, 541px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u3046\u307e\u304f\u30c6\u30fc\u30d6\u30eb\u306b\u4fdd\u5b58\u3055\u308c\u3001\u30b9\u30c6\u30fc\u30bf\u30b9\u3082\u4fdd\u5b58\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u305d\u306e\u5f8c\u30e1\u30fc\u30eb\u9001\u4fe1\u304c\u3046\u307e\u304f\u3044\u3063\u305f\u3053\u3068\u3092\u60f3\u5b9a\u3057\u3066\u30e1\u30fc\u30eb\u30ed\u30b0\u306e\u6700\u7d42\u884c\uff08\u3064\u307e\u308a\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306f<code>user10@example.com<\/code>\uff09\u306e<code>status<\/code>\u3092<code>sent<\/code>\u3078\u5909\u66f4\u3057\u3066\u3082\u3046\u4e00\u5ea6\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u3059\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12013\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/09\/laravel_failed_email_rule_3.png\" alt=\"\" width=\"542\" height=\"373\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/09\/laravel_failed_email_rule_3.png 542w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/09\/laravel_failed_email_rule_3-300x206.png 300w\" sizes=\"auto, (max-width: 542px) 100vw, 542px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n<code>user10@example.com<\/code>\u306e\u30c7\u30fc\u30bf\u304c\u6d88\u3048\u307e\u3057\u305f\u3002<\/p>\n<p>\u6210\u529f\u3067\u3059\ud83d\ude0a\u2728<\/p>\n<p>\u3067\u306f\u3001\u7d9a\u3044\u3066\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u30c1\u30a7\u30c3\u30af\u3067\u3059\u3002<br \/>\n\u30eb\u30fc\u30c8\u306b\u4ee5\u4e0b\u3092\u8ffd\u52a0\u3057\u3066\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u203b \u306a\u304a\u3001\u3053\u306e\u4e2d\u306e<code>user9@example.com<\/code>\u306f\u9001\u4fe1\u5931\u6557\u30e1\u30fc\u30eb\u3068\u3057\u3066\u4fdd\u5b58\u3055\u308c\u305f\u30a2\u30c9\u30ec\u30b9\u3067\u3059\u3002<\/p>\n<p><strong>routes\/web.php<\/strong><\/p>\n<div>\n<pre><strong>use Illuminate\\Support\\Facades\\Validator;<\/strong>\r\n<strong>use App\\Rules\\IsSendableEmailAddress;<\/strong>\r\n\r\n<strong>\/\/ \u7701\u7565<\/strong>\r\n\r\n<strong>Route::get('failed_email', function(){<\/strong>\r\n\r\n<strong>    $checking_email = 'user9@example.com';<\/strong>\r\n\r\n<strong>    $validator = Validator::make(<\/strong>\r\n<strong>        ['email' =&gt; $checking_email],<\/strong>\r\n<strong>        ['email' =&gt; [<\/strong>\r\n<strong>            'required',<\/strong>\r\n<strong>            'email',<\/strong>\r\n<strong>            'max:255',<\/strong>\r\n<strong>            new IsSendableEmailAddress(),<\/strong>\r\n<strong>        ]]<\/strong>\r\n<strong>    );<\/strong>\r\n\r\n<strong>    if($validator-&gt;fails()) {<\/strong>\r\n\r\n<strong>        $error_messages = $validator-&gt;errors()-&gt;all();<\/strong>\r\n<strong>        dd($error_messages);<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n\r\n<strong>    return '\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u901a\u904e\u3057\u307e\u3057\u305f';<\/strong>\r\n<strong>});<\/strong><\/pre>\n<\/div>\n<p>\u3046\u307e\u304f\u3044\u304f\u3067\u3057\u3087\u3046\u304b\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12015\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/09\/laravel_failed_email_rule_4.png\" alt=\"\" width=\"436\" height=\"78\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/09\/laravel_failed_email_rule_4.png 436w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/09\/laravel_failed_email_rule_4-300x54.png 300w\" sizes=\"auto, (max-width: 436px) 100vw, 436px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u3046\u307e\u304f\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3082\u52b9\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u3059\u3079\u3066\u6210\u529f\u3067\u3059\u3002\ud83d\ude0a\ud83d\udc4d<\/p>\n<h1>\u4f01\u696d\u69d8\u3078\u306e\u3054\u63d0\u6848<\/h1>\n<p>\u4eca\u56de\u306e\u3088\u3046\u306b<code>Laravel<\/code>\u3060\u3051\u3067\u306f\u89e3\u6c7a\u3067\u304d\u306a\u3044\u554f\u984c\u3082\u3044\u308d\u3044\u308d\u306a\u30c6\u30af\u30ce\u30ed\u30b8\u30fc\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3068\u89e3\u6c7a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3082\u3057\u4eca\u56de\u306e\u3088\u3046\u306a\u6a5f\u80fd\u3092\u3054\u5e0c\u671b\u3067\u3057\u305f\u3089\u3044\u3064\u3067\u3082\u304a\u554f\u3044\u5408\u308f\u305b\u304b\u3089\u3054\u76f8\u8ac7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u304a\u5f85\u3061\u3057\u3066\u304a\u308a\u307e\u3059\u3002\ud83d\ude0a\u2728<\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f\u30e1\u30fc\u30eb\u30ed\u30b0\u304b\u3089\u9001\u4fe1\u5931\u6557\u30e1\u30fc\u30eb\u3092\u53d6\u5f97\u3057\u3066\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u5316\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u306a\u304a\u3001\u4eca\u56de\u306e\u8a18\u4e8b\u3067\u91cd\u8981\u306a\u70b9\u306f\u300c<strong>\u3072\u3068\u3064\u3072\u3068\u3064\u306f\u7279\u306b\u5bfe\u3057\u3066\u96e3\u3057\u3044\u4f5c\u696d\u3067\u306f\u306a\u3044<\/strong>\u300d\u3068\u3044\u3046\u90e8\u5206\u3067\u3059\u3002<\/p>\n<p>\u3064\u307e\u308a\u3001\u7121\u6570\u306b\u3042\u308b\u6a5f\u80fd\u306e\u4e2d\u304b\u3089\u5fc5\u8981\u306a\u3082\u306e\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u3044\u308d\u3044\u308d\u306a\u3053\u3068\u304c\u5b9f\u73fe\u3067\u304d\u308b\u3088\u3068\u3044\u3046\u306e\u304c\u30b3\u30f3\u30bb\u30d7\u30c8\u3067\u3057\u305f\u3002<\/p>\n<p>\u305c\u3072\u7686\u3055\u3093\u3082\u4eca\u56de\u306e\u3088\u3046\u306a\u300c<strong>\u639b\u3051\u5408\u308f\u305b<\/strong>\u300d\u3067\u4f55\u304b\u6a5f\u80fd\u3092\u4f5c\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\u2757<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9439 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/07\/no_30.png\" alt=\"\" width=\"224\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/07\/no_30.png 224w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/07\/no_30-210x300.png 210w\" sizes=\"auto, (max-width: 224px) 100vw, 224px\" \/>\u300c\u30b2\u30fc\u30e0\u306f\u307b\u307c\u3084\u3089\u306a\u304f<br \/>\n\u306a\u3063\u3061\u3083\u3063\u305f\u3051\u3069\u3001<br \/>\n\u300e\u304f\u306b\u304a\u304f\u3093\u300f\u306e\u65b0\u4f5c\u306f\u3084\u308a\u305f\u3044\u306a\u301c\u2757\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u30b5\u30a4\u30c8\u306e\u904b\u55b6\u3092\u3057\u3066\u3044\u308b\u3068\u30db\u30f3\u30c8\u306b\u3044\u308d\u3044\u308d\u306a\u3068\u3053\u308d\u3067\u4fee\u6b63\u304c\u5fc5\u8981\u306a\u90e8\u5206\u304c\u51fa\u3066\u304f\u308b\u3068\u306f\u601d\u3046\u306e\u3067\u3059\u304c\u3001\u3053\u306e\u9593\u56f0\u3063\u305f\u306e\u304c\u4eca\u56de\u306e\u30c6\u30fc\u30de\u306b\u3057\u305f\u3001 \uff08\u5b9f\u306f\uff09\u30e1\u30fc\u30eb\u304c\u9001 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=12008\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u3010Laravel\u3011\u30e1\u30fc\u30eb\u9001\u4fe1\u306b\u5931\u6557\u3057\u305f\u30a2\u30c9\u30ec\u30b9\u3092\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3067\u62d2\u5426\u3059\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":12020,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-12008","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/12008","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12008"}],"version-history":[{"count":9,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/12008\/revisions"}],"predecessor-version":[{"id":12025,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/12008\/revisions\/12025"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/12020"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12008"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}