Working on a project using Blade 5.1. I know this isn't best practice as blade should just take care of view data. However, I need to template out a section that is in the master template. The master template has something like this:
<?php
function q($q) {$q['meta'] = @yield('meta');return $q;}
add_filter( 'document_title_parts', 'q' )
home.blade.php
@extends('layouts.master')
@section('meta')
Hello world
@endsection
My question is, is it possible to access the section meta value passed in to the master template as a php variable? In simple terms, the goal here is to set $q['meta'] to 'Hello world' successfully.
Thanks in advance
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire