xxxxxxxxxx
Solution 1: You can pass variable from the blade file via the @extends as second argument function.
Controller:
public function index(){
$title='Sir/Madam';
return view('home',compact('title'));
}
Home.blade.php
<?php
@extends('layouts.admin', ['title' => $title])
Layout.master.blade.php
dd($title)
you will see results.