slink/laravel/resources/views/profile.blade.php

40 lines
1.4 KiB
PHP
Raw Normal View History

2024-06-09 22:03:34 +00:00
@extends('default')
@section('title')
Profile
@endsection
@section('content')
2025-03-02 19:04:31 +00:00
<div id="title-container" class="container">
<h1>Profile</h1>
</div>
2025-03-06 14:14:18 +00:00
<div id="profile-container" class="container"> <!-- TODO: Add ability to change & reverify email -->
2025-03-02 19:04:31 +00:00
<p>Username: <em>{{ Auth::user()->name }}</em></p>
<p>Email: <em>{{ Auth::user()->email }}</em></p>
<p>Created at: <em>{{ Auth::user()->created_at }}</em></p>
</div>
<div id="table-container" class="container">
2025-03-02 20:10:42 +00:00
<h2>My Short URLs</h2>
2025-03-02 19:04:31 +00:00
<table>
2025-03-02 20:10:42 +00:00
<tbody>
2025-03-02 19:04:31 +00:00
<tr>
2025-03-02 20:10:42 +00:00
<th>Link</th>
<th>Destination</th>
<th>Created at</th>
2025-03-02 19:04:31 +00:00
</tr>
2025-03-02 20:10:42 +00:00
@foreach ($shortlinks as $shortlink)
<tr>
<td><a href="{{ url()->to("l/" . $shortlink->shortid) }}">{{ $shortlink['shortid'] }}</a></td>
<td class="table-truncate"><div class="destination">{{ $shortlink['destination'] }}</div></td>
<td>{{ Carbon\Carbon::parse($shortlink->created_at)->format('M jS Y') }}</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<td colspan="3"><a href="/home">Shorten a new link</a></td>
</tr>
</tfoot>
2025-03-02 19:04:31 +00:00
</table>
</div>
2024-06-09 22:03:34 +00:00
@endsection