Support the ongoing development of Laravel.io →
Cache Views Blade

Hi!

I am making a newsfeed for my application using the strategy pattern because the list contains different item types, f.ex. user profile information, images, etc. The feed is populated by objects that implement the same interface, and return a ViewPresenter class to present themselves.

It is all working well, but I am simplifying it using Blade templating now. As soon I apply a @extends('layouts.master') section to the views and move all my formatting into the master, ALL views are showing exactly the same object. For example the same user image, even though the contents of the views are different.

Before:

  • User image
  • User comment
  • Friend comment
  • New document etc.

After:

  • User image 1
  • User image 1
  • User image 1
  • User image 1 ...

Since this happens when using the blade extension, can it have something to do with this? I thought maybe some kind of caching?

Regards, Skovmand.

Last updated 2 years ago.
0

Seems like this is my problem: https://github.com/laravel/framework/issues/1058

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

skovmand skovmand Joined 27 May 2014

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.

© 2025 Laravel.io - All rights reserved.