I just wanna print something thanks to @yield in my layout (cristarium), but for some reason is doing nothing, it just appear the text MASTER but don't HELLO.
VIEWS FOLDER LOCATIONS
resources\views\ffxiii-2\cristarium.blade.php
resources\views\ffxiii-2\cristarium_personajes\noel_kreiss.blade.php
ROUTE IN WEB.PHP
Route::get('/ffxiii-2/cristarium', function () {
return view('ffxiii-2.cristarium');
})->name('cristarium');
LAYOUT -> cristarium.blade.php
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Cristarium</title>
</head>
<body>
MASTER
<div class="container">
@yield('content')
</div>
</body>
</html>
BLADE TO PRINT -> noel_kreiss.blade.php
@extends('ffxiii-2.cristarium')
@section('content')
HELLO
@endsection
I tried to change the name's folder avoiding the underscore, and changing to the - in ffxiii-2, but still don't work, so I think that's not the problem.
Views cascade the other way.
Your route is showing the view which renders the file
ffxiii/cristarium.blade.php,this is your master layout.
What you need to do is to return the view
ffxiii-2/cristarium_personajes/noel_kreissfrom the route, which will the render that view, which in turn includes your master layout.E.g.