Roy-Try-Catch

The Roy Deploy

從 Request 到 Response 的技術實踐


專注於後端維運架構

【Laravel】Queue + Horizon 完整實作 - 非同步任務與監控

本篇介紹如何在 Laravel 框架中,使用 Queue 處理非同步任務,並搭配 Laravel Horizon 進行視覺化監控管理。 為什麼需要 Queue? 在 Web 應用中,有些任務不需...

Roy • 2026-02-27 • 0 comments

【RealTime】Laravel Reverb - 官方 WebSocket Server 完整實作

本篇介紹如何在 Laravel 框架中,使用官方內建的 Laravel Reverb 實作 WebSocket 即時通訊。 什麼是 Laravel Reverb? Laravel Reverb 是 Laravel 官方在 11.x...

Roy • 2026-02-27 • 0 comments

【RealTime】Server-Sent Events - php 範例

Server-Sent Events (SSE) 是一種讓伺服器以即時串流的方式,將更新或事件推送到客戶端的技術。與 WebSocket 不同,SSE 是單向的,只支援從伺服器向客戶端推送資...

Roy • 2024-08-29 • 0 comments

【RealTime】Websocket VS SSE (Server-Sent Events)

1. 基本概念 WebSocket 要雙向、SSE 只要單向推送;先看需求是哪一種,再決定要付出多少連線成本。 WebSocket: 一種全雙工通訊協定,允許在單一 TCP 連線...

Roy • 2024-08-29 • 0 comments

【OpenAi】串接openAi - chatGpt Api

更新提醒(2026-10):本文寫於 2023 年,使用 gpt-3.5-turbo 模型、orhanerday/open-ai 套件,以及串流範例中的 prompt 參數(舊式 completions 格式)。OpenAI...

Roy • 2023-08-09 • 0 comments

【GitLab】利用 GitLab 執行 CI/CD(持續整合/自動部署)

更新提醒(2026-10):本文寫於 2023 年,.gitlab-ci.yml 範例使用 only 關鍵字,gitlab-runner 的安裝腳本與註冊流程可能也可能已有調整,建議對照 GitLab 官方...

Roy • 2023-02-17 • 0 comments

【Laravel】Laravel Octane With Swoole 體驗

更新提醒(2026-10):本文寫於 2023 年,Octane 與 Swoole 的版本、安裝方式與壓測數據都是當時環境的結果,不同硬體與版本的數字可能差異很大。較新的實測可參...

Roy • 2023-01-07 • 0 comments

【Laravel】whereIn is slow or empty data

A quick fix for Laravel’s slow whereIn Laravel 使用 ORM 時常會用到 whereIn。最近遇到傳入的陣列太大,結果完全查不到資料。查了之後才發現,Eloquen...

Roy • 2023-01-07 • 0 comments

【Laravel】SSL certificate problem: unable to get local certificate issuer

Error SSL certificate problem: unable to get local certificate issuer 在 Laravel 實作 LINE Bot SDK 的推播測試時,遇到以下錯誤: SSL certificate...

Roy • 2022-03-15 • 0 comments

【Supervisor】Linux上利用Supervisor跑Crontab、Queue、Socket

更新提醒(2026-10):本文寫於 2022 年,安裝段落包含 yum、pip、easy_install 與 python-setuptools-devel 等舊式做法,其中部分指令在新版發行版上可能已不適...

Roy • 2022-03-14 • 0 comments