Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

livewire @js

<script>
    let posts = @js($posts)
 
    // "posts" will now be a JavaScript array of post data from PHP.
</script>
Source by laravel-livewire.com #
 
PREVIOUS NEXT
Tagged: #livewire
ADD COMMENT
Topic
Name
4+3 =