Laravel @extends Directive

Used to expand any view file. This will usually be a layout page. For example, you create a master page (layout) and create the necessary @yield and @stack fields in it. You then use other views by extending them from this layout page. That is to say;

// layout.blade.php
<html>
<head>
    ..
    @stack('extra-information')
    ..
</head>
<div id="app">
@yield('content')
</div>

By expanding this layout page, it is ensured that the same structure is used in other subpages. Thus, it will be sufficient to add only the content and extra-information fields.

// users.blade.php
@extends('layout')

@push('extra-information')
    <link href="{{ mix('css/users.css') }}">
@endpush

@section('content')
    users
@endsection
Comments

There are no comments, make the firs comment