blob: 5bd20b0e803c19505e02baa0615f16e322fa1e59 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
@extends('layout')
@section('content')
<h1>Create a new book</h1>
<form method="post" action="/books">
@csrf
<div>
<label for="name">Name: </label>
<input type="text" name="name" id="name" required>
</div>
<div>
<label for="published_at">Published at: </label>
<input type="datetime" name="published_at" id="published_at">
</div>
<div>
<label for="is_online">Is online?: </label>
<input type="checkbox" name="is_online" id="is_online">
</div>
<div>
<label for="author_id">Author: </label>
<select id="author_id" name="author_id">
<option value="">Select an author</option>
@foreach ($authors as $author)
<option value="{{ $author->id }}">{{ $author->name }}</option>
@endforeach
</select>
</div>
<button type="submit">Save</button>
</form>
@endsection
|