I'm having an issue with a Laravel blade view that is not rendering properly and keeps loading forever. I have a route that is supposed to display a profile page for a user, and it was working fine with pure HTML. However, when I tried to use the blade view, the page keeps loading and does not display anything.
Here's my code for the route:
Route::get('/profile/{family_id}', [UserProfileController::class, 'showProfile'])->name('profile');
And here's my code for the blade view (profile.blade.php):
@extends('dashboard-layout')
@section('title','Dashboard')
@section('content')
<div class="content-body">
<div class="row">
<div class="col-lg-12">
<div class="profile">
<div class="profile-head">
<div class="profile-info">
<div class="row justify-content-center">
<div class="col-xl-8">
<div class="row">
<div class="col-xl-4 col-sm-4 border-right-1 prf-col">
<div class="profile-name">
<h4 class="text-primary">Name: {{$clients -> headofhousehold_firstname}} {{$clients -> headofhousehold_lastname}}</h4>
<p>Address: {{$clients -> address}}</p>
</div>
</div>
<div class="col-xl-4 col-sm-4 border-right-1 prf-col">
<div class="profile-email">
<h4 class="text-muted"> <p>Family ID : {{$clients -> id}} </p></h4>
<p>Email</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
What I have tried:
I've tried removing the @section('title','Dashboard') and @section('content') directives, and the page loads properly. However, I need those sections for my layout.
I'm not sure what's causing the issue, but I suspect it may have something to do with the route or the blade view. Any help or suggestions would be greatly appreciated. Thanks in advance!