Hi everyone I am facing an issue
I was using this layout architecture before and facing this issue
in master.blade.php
code.....
@php $foo = "bar"; @endphp
@yield('main')
code ends....
in contact.blade.php
@extends('master')
code...
@section('main')
@php echo $foo; @endphp
@endsection
code ends...
ERROR: undefined varibale foo in contact.blade.php
.......................................................................
then I switched to the new architecture and again I am facing the same issue.
in master.blade.php
code.....
@php $foo = "bar"; @endphp
code ends....
in contact.blade.php
code...
@includes('master')
@php echo $foo; @endphp
code ends...
ERROR: undefined varibale foo in contact.blade.php
So suggest me what I have to do to access the variable.