Answers for "laravel all pages title dyanmics"

PHP
3

laravel title dynamic

<!-- Stored in resources/views/layouts/master.blade.php -->

<html>
    <head>
        <title>App Name | @yield('mytitle')</title>
    </head>
    <body>
        <div class="container">
            @yield('content')
        </div>
    </body>
</html>
  
<!-- Extending the master.blade.php into another view file. Eg. About Us Page -->

@extends('layouts.master')

@section('mytitle', 'About Us')

@section('content')
    <h1>"Let's Go"</h1>
@endsection
Posted by: Guest on June-18-2020

Browse Popular Code Answers by Language