by Devin Yang
(This article was automatically translated.)

Published - 2 years ago ( Updated - 2 years ago )

Before starting your Livewire journey,
Here are three basic considerations about public properties:

* 100009*1. The property name cannot conflict with the property name reserved for Livewire (for example, $rules or $message)

2. The data stored in the public properties (public properties), for Front-end JavaScript is visible.
Therefore, you should not store sensitive data in it.

3. Attributes can only be JavaScript-friendly data types (string, integer, array, boolean), or one of the following PHP types: Stringable, Collection, DateTime, Model, EloquentCollection.

Tags: laravel livewire

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


laravel,blade

New features in Laravel 5.5, in Blade's "json" directive

Laravel 5.5 supports a new directive called json. In the Blade template, json can be printed without calling json_encode.

dlaravel,docker

D-Laravel learning three stages

Chat about the three stages of using D-Laravel, why use D-Laravel. Because the configuration files used by D-Laravel are quite simple, it is very suitable for beginners of Docker to learn, And users who do not know how to use Docker can also use the two commands ./console and ./create to create a project.