I do not understand why the content is not visible no browser.
index.blade.php
<!DOCTYPE html>
<html>
<head>
<title>Teste</title>
</head>
<body>
@yield('content')
</body>
</html>
conteudo.blade.php
@extends('index')
@section('content')
<p>This is my body content.</p>
@endsection
routes.php
Route::get('index', function() {
return view('layouts/index');
});
Route::get('blade', function() {
return view('layouts/conteudo');
});
Try this out:
please change your conteudo.blade.php
code
@extends('index')
@section('content')
<p>This is my body content.</p>
@endsection
To
@extends('layouts.index')
@section('content')
<p>This is my body content.</p>
@endsection
Hope this helps you.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.