Laravel @prepend Directive
You know that we add data with @push to the field created with @stack. We also use this directive to add content to the beginning of the field.
// layout.blade.php
<head>
..
@stack('head-info')
..
</head>
For example, let's say we push a value on our members page.
// users.blade.php
@push('head-info')
<link href="{{ mix('css/users.css') }}">
@endpush
In addition, we can add a value before this css definition with the @prepend directive.
// users.blade.php
..
@prepend('head-info')
<link href="{{ mix('css/users-pre.css') }}">
@endprepend
Comments
Popular Articles
Popular Tags
- #directive
- #Function
- #Json
- #Class
- #SASS
- #Form
- #Redirect
- #API
- #Special Characters
- #Special
- #Random
- #Generating
- #
- #Text
- #Ajax
- #URL
- #Encrypting
- #React
- #Show
- #timeAgo
- #PSR-4
- #Hide
- #DDOS Protection
- #DDOS
- #cURL
- #Logic For Displaying Posts
- #Error
- #Key
- #General Error
- #1364 Field
- #Abbreviation
- #Blade
- #Version
- #QR
- #QR Code Generating
- #Array
- #Arrays with Key Values to String Statement
- #Short Tag
- #Activate
- #Real Time
- #Socket.io
- #301
- #Custom Directives
- #Iframe Detection
- #Date
- #Characters
- #Insert
- #Autoloader
- #Composer
- #Reading
There are no comments, make the firs comment