Support the ongoing development of →
posted 6 years ago
Last updated 2 years ago.

Hi David,

I think I have a project in a Laravel 4 version.

I use subviews frequently when paging things and then using ajax to replace the complete subview part.

Here you can see the controller, which inserts a page of the item list into the index view as a subview. I used blade templating (@section), but you can ignore that part. The important thing is that you can pass the subview(s) as variable(s) into the containing view and then cast them to string(s). I the provided examples the cast is implicit and occurs after

{{ $list }}

is expanded to

echo $list



Sign in to participate in this thread!


Your banner here too?


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

Your logo here?

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

© 2024 - All rights reserved.