I have a blade master view in Laravel which contains the code {{$home or ''}}
. My server is using PHP 7.1, Nginx. I migrated the code to another server with cPanel, just copied the whole contents and database and setup everything. The server to which I migrated the code runs Litespeed and Php 7.3. The same code works on server running nginx but not the newly migrated server. When I browse the page, I get Undefined variable: home
. How can it run on nginx and not when using Litespeed. I'm new to litespeed and I haven't configured anything specific to laravel. Can someone please help to get this working.
Edit 1: based on this, this syntax doesn't work on Laravel 5.7 and above but I'm using 5.8 and it works fine at the moment on old server.