Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Synchro's avatar

Pushed parts of blade template don't get updated

I have a very simple template along these lines:

@push('scripts')
  //Script stuff here
@endpush
<x-app-layout>
  //Layout stuff here
</x-app-layout>

The problem I have is that when I change things in the layout part and reload the page, the changes are visible. If I change something in the script part however, I can't persuade it up update. I'm working locally using artisan serve, have cleared all caches, restarted the service, but nothing is getting updated, even if I remove the script contents entirely. This is mysterious to me since these parts are in the same file. How can I persuade it to show the changes in the script part?

0 likes
8 replies
Synchro's avatar

@MohamedTammam yes, I’ve cleared all caches, including deleting the contents of bootstrap/cache and the browser. The problem seems to be that part of the page is stored somewhere that’s not a cache, for example in app.js, but I would not expect that to be used for per-page scripts. Also, browsers cache whole resources, not pieces of them.

MohamedTammam's avatar

@Synchro I doesn't make sense, you're probably working on a different file. because if you clear your browser cache and views cache and it's per page script and you don't see it's changing, you're mostly on the wrong file.

Synchro's avatar

@MohamedTammam I know, it's very strange, which is why I was asking. There really is only one file; changing one part of it works, changing the other does not. If neither part was showing changes, then normal caching would explain it, but that's not what I'm seeing.

Synchro's avatar

@Sinnbeck That’s what I meant when I said I’ve cleared all caches. It doesn’t help.

Sinnbeck's avatar

@Synchro Ok I just assumed you meant /bootstrap/cache and browser cache. The command deletes the views under /storage/framework/views

Synchro's avatar
Synchro
OP
Best Answer
Level 2

My IDE (PHPStorm) was updated and restarted, and the problem has now gone away. I've no idea what the cause was, and I can't think of any mechanism that would have caused this behaviour, but now I can at least work again!

Please or to participate in this conversation.