laravel

解決Laravel連接MySQL8驗證失敗錯誤

之前一直用MariaDB沒感覺,這次因為需求變動改用最新的MySQL 8 後, Laravel 就無法連接上資料庫了,囧。 對資料庫進行任何操作都出現了 The server requested authentication method unknown to the client 錯誤: Illuminate\Database\QueryException : SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

Laravel 7 配置郵件服務 Mailgun

2016年的時候,Mailgun 免費註冊帳號還能添加自定義域名(當時Y Cheung 曾寫過一篇blog:Centos7 安裝 Postfix 並配置 mailgun 服務 [https://szeching.com/config-postfix-and-mailgun-on-centos-7/] ),想不到現在新註冊帳號已經是需要先綁定銀行卡才能使用自定義域名,而註冊分配給你的測試域名Sandbox subdomain壓根就不能用,你會遇到類似以下的報錯信息: { "message": "Sandbox subdomains are for test purposes only. Please add your own domain

Laravel Database Migrations中的 timestamps 與 nullableTimestamps

才知道Laravel Database Migrations 中的 timestamps和nullableTimestamps 在版本5.5之後數據庫中建立的是相同類型和屬性的column!!!好坑啊!!! 原文件(vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php)中指出: /** * Add nullable creation and update timestamps to the table. * * @param int $precision * @return void