Support the ongoing development of Laravel.io →
posted 8 years ago
Blade
Last updated 2 years ago.
0

They are used when making "layouts" that other views inherit from.

such as..

base.blade.php


<html> blahlashlhdskjfhksdhf
@yield('JS')
</html>

then on some page. lets say.... account.blade.php

@extends('base');

@section('JS')
some js here...
@endsection

essentially it means the master (base) layout will "yield" and allow the sub view that inherits from it to pass data back to it.

Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

DrewJay drewjay Joined 29 Feb 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.