在開始您的 Livewire 之旅之前,
以下是關於公開屬性(public properities)的三項基本注意事項:
一、屬性名稱不能與為 Livewire 保留的屬性名稱衝突(例如$rules或$message)
二、儲存在公開屬性(public properities)中的資料,對前端 JavaScript 是可見的。
因此,您不應在其中儲存敏感資料。
三、屬性只能是 JavaScript 友好的資料類型(字符串、整數、數組、布爾值),或以下 PHP 類型之一:Stringable、Collection、DateTime、Model、EloquentCollection。
No Comment
Post your comment