Support the ongoing development of Laravel.io →
Views Blade Forms
Last updated 1 year ago.
0

Hi, make sure that's @yield('containertest') is in a test template so it must show loke this:

~\resources\views\test.blade.php:

This is the Test template.

@yield('containertest')

and

~\resoureces\views\childtemplate.blade.php:

@extends('test')

@section('containertest')
    Testing 'containertest'
@endsection

u must return the childtemplate from the controller as view.

0

The syntax and location of the templates are correct, as you mentioned.

I did not understand what you mean by "u must return the childtemplate from the controller as view". If you mean that I have to do this in the controller method : return view ('childtemplate'); the result is an error:

ErrorException in C: \ wamp \ www \ Laravel \ vendor \ Laravel \ framework \ src \ Illuminate \ View \ FileViewFinder.php line 137: View [app] not found. (View: C: \ wamp \ www \ Laravel \ resources \ views \ teste.blade.php)

But I think we have to make the call to the parent template, is not it?

0
 return view('childtemplate');
0

Ok, but the result is an error ("teste.blade.php" is a child template) :

ErrorException in C: \ wamp \ www \ Laravel \ vendor \ Laravel \ framework \ src \ Illuminate \ View \ FileViewFinder.php line 137: View [app] not found. (View: C: \ wamp \ www \ Laravel \ resources \ views \ teste.blade.php)

!!!!!!

0

I get an error :

ErrorException in C: \ wamp \ www \ Laravel \ vendor \ Laravel \ framework \ src \ Illuminate \ View \ FileViewFinder.php line 137: View [app] not found. (View: C: \ wamp \ www \ Laravel \ resources \ views \ childtemplate.blade.php)

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Gch gch Joined 27 Jun 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.