48 lines
2.5 KiB
PHP
48 lines
2.5 KiB
PHP
@extends('layouts.app')
|
|||
|
|
|
||
|
|
@section('title', 'Create Topic - Forum - ClearGame')
|
||
|
|
|
||
|
|
@section('content')
|
||
|
|
<div class="container">
|
||
|
|
<nav aria-label="breadcrumb" class="mb-4">
|
||
|
|
<ol class="breadcrumb">
|
||
|
|
<li class="breadcrumb-item"><a href="{{ route('forum.index') }}" class="text-decoration-none">Forum</a></li>
|
||
|
|
<li class="breadcrumb-item"><a href="{{ route('forum.categories.show', $thread->category) }}" class="text-decoration-none">{{ $thread->category->name }}</a></li>
|
||
|
|
<li class="breadcrumb-item"><a href="{{ route('forum.threads.show', $thread) }}" class="text-decoration-none">{{ $thread->title }}</a></li>
|
||
|
|
<li class="breadcrumb-item active">Create Topic</li>
|
||
|
|
</ol>
|
||
|
|
</nav>
|
||
|
|
|
||
|
|
<div class="card bg-dark text-white">
|
||
|
|
<div class="card-header">
|
||
|
|
<h1 class="h3 mb-0">Create New Topic</h1>
|
||
|
|
<p class="text-muted mb-0">in thread: {{ $thread->title }}</p>
|
||
|
|
</div>
|
||
|
|
<div class="card-body">
|
||
|
|
<form action="{{ route('forum.topics.store') }}" method="POST">
|
||
|
|
@csrf
|
||
|
|
<input type="hidden" name="thread_id" value="{{ $thread->id }}">
|
||
|
|
<div class="mb-3">
|
||
|
|
<label for="title" class="form-label">Topic Title</label>
|
||
|
|
<input type="text" class="form-control bg-dark text-white @error('title') is-invalid @enderror" id="title" name="title" value="{{ old('title') }}" required>
|
||
|
|
@error('title')
|
||
|
|
<div class="invalid-feedback">{{ $message }}</div>
|
||
|
|
@enderror
|
||
|
|
</div>
|
||
|
|
<div class="mb-3">
|
||
|
|
<label for="content" class="form-label">Content</label>
|
||
|
|
<textarea class="form-control bg-dark text-white @error('content') is-invalid @enderror" id="content" name="content" rows="10" required>{{ old('content') }}</textarea>
|
||
|
|
@error('content')
|
||
|
|
<div class="invalid-feedback">{{ $message }}</div>
|
||
|
|
@enderror
|
||
|
|
</div>
|
||
|
|
<div class="d-flex gap-2">
|
||
|
|
<button type="submit" class="btn btn-gradient">Create Topic</button>
|
||
|
|
<a href="{{ route('forum.threads.show', $thread) }}" class="btn btn-outline-light">Cancel</a>
|
||
|
|
</div>
|
||
|
|
</form>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
@endsection
|