Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel components scripts


//you can write this in your parent component @stack('scripts'), 
//and in your child component you can write like this @push('scripts).

//your child component code will be like this

@push('scripts')
<script src="example.js"></>
@endpush

//it will only push the scripts to the parent component when you load the child component.
 
PREVIOUS NEXT
Tagged: #laravel #components #scripts
ADD COMMENT
Topic
Name
4+2 =