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.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community