On the paths you need to be SSRed you can return normal view return view(...) from the controller and laravel will handle rendering these paths on the server and not Inertia
Mar 8, 2022
10
Level 5
Can Inertia's SSR feature be enabled only for some pages?
I'm trying to decide if I'm going to use Inertia or Livewire for a side project of mine. I'm going to need Server Side Rendering only for a few paths in my app but not all of them and was wondering if Inertia allows for excluding or including only certain Pages to be SSR'ed. I've searched through the docs and the Github issues/discussions and didn't find anything related to this. Has anyone here tried this? Thanks!!
Level 1
By setting $__inertiaSsr = null in your blade view you can disable SSR. You can set this depending on the route in your app.blade.php to exclude it from the SSR:
@if(Request::is('app/*'))
@php($__inertiaSsr = null)
@endif
3 likes
Please or to participate in this conversation.