avatar-avatar
Ray
# 安裝 npm install -g typescript # 編譯 使用框架如 NextJS 時,框架會自動執行 TS 編譯 tsc hello.ts # Hello TypeScript 範例:function sayHello(person: string) { retu
avatar-avatar
Ray
# JSON Unicode Cast Type 12.3 Eloquent Attributes 新增 json:unicode cast type,允許 JSON encoding JSON_UNESCAPED_UNICODE <?php protected $casts = [ '
avatar-avatar
Ray
# 安裝 npm install -g typescript # 編譯 使用框架如 NextJS 時,框架會自動執行 TS 編譯 tsc hello.ts # Hello TypeScript 範例:function sayHello(person: string) { retu
avatar-avatar
Ray
在 Next.js 中有四種方法可以在 routes 之間導航: 使用 <Link> component 使用 useRouter hook(用於 Client Components) 使用 redirect 函數(用於 Server Components) 使用原生的 History AP
Thumbnail
avatar-avatar
Ray
# Community Starter Kit Support in laravel new 12.2 Laravel new command,新增支援 community starter kit,支援的清單可 參考 laravel new --using statamic/statamic m
avatar-avatar
Ray
# 建立 Routes Next.js 使用基於檔案系統的路由器,資料夾用來定義 routes。 每個資料夾代表一個 route segment,對應到一個 URL segment。 要建立 nested routes,可以將資料夾彼此巢狀。 使用特殊的 page.js 檔案來讓 rou
Thumbnail
avatar-avatar
Ray
# Memoized Cache Driver 12.9 新增 memo cache driver,可以對 cache 在做一層 memory cache,比如第一次從 Redis cache 撈,但在同一個 req 當中,之後都可從 PHP Process memory 當中撈 <?php C
avatar-avatar
Ray
每個應用程式的骨架是路由。此頁將介紹網頁路由的基本概念,以及如何在 Next.js 中處理路由。 # 術語 你會在文件中看到這些術語,以下是快速參考: # 元件樹的術語 tree:用來視覺化階層結構的一種約定。例如包含父元件和子元件的元件樹、資料夾結構等。 subtree:tree 的
Thumbnail
avatar-avatar
Ray
# Query Builder pipe() Method 12.4 新增 pipe() method 定義在特定 model,且只有該 model 可重複使用時,使用 scope 不一定要定義在 model,可定義在單獨 class,且可在多個 model 中 reuse,使用 tap 不
avatar-avatar
Ray
這篇文章記錄在 Linux server 上使用 Laravel schedule 排程任務的過程,包含 Laravel schedule 的定義、以及設定 Linux crontab 的步驟,並說明其中需要注意的權限問題。
Thumbnail
avatar-img