So that is fine if they are logged in, but you haven't defined the other section if they are a guest. So you are getting the blank page for guests, and seeing the content when logged in ?
When they are guest, they do see whatever 'content' is yielded. However, I want to provision a system for yielding in content @yield('logged_in') whenever someone in their partial uses @section('logged_in'). As you see, I am doing that, but it doesn't load up. The best it does is load up the default layout with no content yielded, not logged_in content, nor the usual guest content.
It works however if I include('view.name') instead of yield, but that isn't scalable.
You could just use 2 different templates that extend the master layout ... and you do that auth check in the controller and then based on that decide which one to render.
Thanks for the insight, but how would I do that?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community