@extends('layouts.app') @section('title', 'My Profile') @section('content')
{{-- Success Message --}} @if(session('success'))
{{ session('success') }}
@endif
{{-- Profile Info --}}
{{-- Avatar --}} @if($user->avatar) Avatar @else
{{ strtoupper(substr($user->name, 0, 1)) }}
@endif

{{ $user->name }}

{{ $user->email }}

@if($user->bio)

{{ $user->bio }}

@else

You haven't added a bio yet.

@endif Edit Profile
{{-- User Posts --}}

Your Posts

@forelse($posts as $post)
{{ $post->title }}

Posted {{ $post->created_at->diffForHumans() }}

{{ \Illuminate\Support\Str::limit($post->content, 200) }}

{{-- Action Buttons --}}
Edit
@csrf @method('DELETE')
@empty

You haven't published any posts yet.

@endforelse
@endsection