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,laravel livewire

Laravel livewire file upload demo

Livewire is a full-stack framework for the Laravel framework. It was the first time I wrote code, and he was probably the one who was able to write and marvel at the magic. My colleague also marveled while writing after being pushed by me. When I first learned Vue, I was not so surprised by him.

laravel

Form method spoofing on Laravel

Why does Laravel need Form Method Spoofing? Because HTML forms do not support actions such as PUT, PATCH and DELETE, on Laravel When submitting the HTML form, we need to send it as an HTTP request through a hidden _method input field.

dlaravel

D-laravel has added the recommended opcache.ini settings

The latest version of D-Laravel has added opcache's recommended settings. The enabling method is very simple, please execute it in the D-Laravel directory.