@extends('layouts.landing') @section('title', $user->name) @section('content')
{{-- Tarjeta de perfil --}}
{{ $user->name }} {{ $user->apellidoPaterno }} {{ $user->apellidoMaterno }}
{{ $user->email }}
@if($user->id !== auth()->id())
@php $me = auth()->user(); $status = $friendship?->status ?? 'none'; $isSender = $friendship?->sender_id === $me->id; @endphp {{-- Botón de amistad --}} @if($status === 'accepted')
@csrf @method('DELETE')
@elseif($status === 'pending' && $isSender)
@csrf @method('DELETE')
@elseif($status === 'pending' && !$isSender)
@csrf
@csrf @method('DELETE')
@else
@csrf
@endif {{-- Botón de mensaje (solo si son amigos) --}} @if($status === 'accepted') Mensaje @endif
@endif
{{-- Publicaciones del usuario --}} @forelse($posts as $post) @include('feed._post', ['post' => $post]) @empty
Este usuario no tiene publicaciones aún.
@endforelse
{{ $posts->links() }}
@endsection @section('scripts') @endsection