
Christian Alvarenga
Pregunta¿Cuál sería la diferencia entre utilizar @yield y @include?

Luis Cano
Con @include agregas directamente un template parcial a tu archivo blade, el tempalte puede o no recibir valores:
<div> @include('shared.errors') <form> <!-- Form Contents --> </form> </div>
@yield trabaja con @section cuando tienes un archivo blade que extiende un template principal, @yield es como un slot o placeholder y @section los datos que llenan ese slot o placeholder:
<!-- resources/views/layouts/app.blade.php --> <html> <head> <title>App Name - @yield('title')</title> </head> <body> <div class="container"> @yield('content') </div> </body> </html>
<!-- resources/views/child.blade.php --> @extends('layouts.app') @section('title', 'Page Title') @section('content') <p>This is my body content.</p> @endsection