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

25 lines
738 B
PHP
Raw Normal View History

2024-06-10 00:31:46 +00:00
@extends('default')
@section('title')
Home
@endsection
@section('content')
2024-06-10 03:31:51 +00:00
<div id="shortener-container">
@if (auth()->check())
<h1>Shorten your URL</h1>
<form action="shorten" method="post">
@csrf
<input type="text" name="url" placeholder="Enter your URL here" required>
<button type="submit">Shorten</button>
</form>
@if ($errors->any())
<p class="error">{{ $errors->first() }}</p>
@endif
@else
<h1>Welcome to slink URL Shortener</h1>
<p><a href="register">Sign Up</a> or <a href="login">Log In</a> to shorten your URLs</p>
@endif
</div>
2024-06-10 00:31:46 +00:00
@endsection