ErrorException (E_ERROR) Trying to get property 'title' of non-object (View: D:\xampp\htdocs\xampp\practise\freecodeesources\views\profiles\index.blade.php)
Previous exceptions
Trying to get property 'title' of non-object (0)
<div class="d-flex">
<div ><strong>{{ $user->posts->count() }}</strong> posts</div>
<div class="pl-5"><strong>23k</strong> followers</div>
<div class="pl-5"><strong>435</strong> following</div>
</div>
<div class="pt-4 font-weight-bold" ><strong>{{ $user->profile->title }}</strong></div>
<div>{{ $user->profile->description }}</div>
<div><a href="#">{{ $user->profile->url ??'N/A' }}</a></div>
</div>
</div>
<div class="row pt-5">
@foreach($user->posts as $post)
<div class="col-4" >
<img src="/storage/{{ $post->image }}" class="w-100">
</div>
@endforeach
After posting showing this error.