@rajoyish You need to actually tell us what’s happening, and what you’re expecting. We’re not clairvoyant, and can’t deduce what’s actually happening on your server(s) from a Blade template snippet.
Nov 2, 2022
7
Level 9
The same code is working differently in different platform
Greeting Artisans! 🙏 I'm building a Laravel 9 application that I have hosted on two different hosting providers such as Linode & Cloud Shared Hosting for testing different things out. However the same code is working differently in different platform. Linode is working as expected, but Cloud Shared Hosting is not showing the result of the following code:
<div class="sm:col-span-1">
<dt class="text-gray-500">Role</dt>
@if($user->role_id === 1)
<dd>
User
</dd>
@elseif($user->role_id === 2)
<dd>
Admin
</dd>
@endif
</div>
Level 6
hellow use it ==
<div class="sm:col-span-1">
<dt class="text-gray-500">Role</dt>
@if($user->role_id == 1)
<dd>
User
</dd>
@elseif($user->role_id == 2)
<dd>
Admin
</dd>
@endif
</div>
1 like
Please or to participate in this conversation.