EExcel 丞燕快速查詢2

EExcel 丞燕快速查詢2
EExcel 丞燕快速查詢2 https://sandk.ffbizs.com/

livewire public variable eloquent for security column

Get livewire public variable

Front web Try to get public $order

document.addEventListener('livewire:load', function () {
  console.log(@this.order);
Get empty Array

livewire window.livewire.find eloquent collection

https://github.com/livewire/livewire/issues/1641?fbclid=IwAR0uHylkj-1vg8p5jUoBgPYfuAYsWnBhgp6EK2bJcBce8ze-tdtAa8ElLNY#issuecomment-736146468

Eloquent Collection data won't be made available to the front end unless you have the collection properties specified in the $rules array as the contents are models, so the same conditions apply to it as apply to just a single model property. This is for security reasons so the whole collection and all properties aren't just sent to the front end.

See the example here of binding to an eloquent collection https://laravel-livewire.com/docs/2.x/properties......

But a standard collection (not eloquent) will work but only with primitive data types. If any models are added to the collection or any php objects (not eloquent models), they will be serialised into an array.

So eloquent use for public variable is OK.

======

Other way use makeHidden()