Laravel Pass Alpine JS Data

Pass Alpine JS data to Laravel Blade components.

To pass Alpine JS data to a Laravel Blade component you need to use a double-colon ::. Doing so stops Laravel from reading the attribute as PHP.

Example

Code