summaryrefslogtreecommitdiff
path: root/Year_3/TSDWL/LARAVEL/iBook/resources/views/books/create.blade.php
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2022-01-24 19:34:26 +0100
committerSanto Cariotti <santo@dcariotti.me>2022-01-24 19:34:26 +0100
commit710f54c0156c5fa081bc6af1a68e7cb44723939b (patch)
tree056a85c362b7b9c5439506a76e0802e57342cc10 /Year_3/TSDWL/LARAVEL/iBook/resources/views/books/create.blade.php
parentb69d50c415ef1571bd42bb3eb1a1b3b38eab43dd (diff)
add example in laravel
Diffstat (limited to 'Year_3/TSDWL/LARAVEL/iBook/resources/views/books/create.blade.php')
-rw-r--r--Year_3/TSDWL/LARAVEL/iBook/resources/views/books/create.blade.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/Year_3/TSDWL/LARAVEL/iBook/resources/views/books/create.blade.php b/Year_3/TSDWL/LARAVEL/iBook/resources/views/books/create.blade.php
index 398c7b4..5bd20b0 100644
--- a/Year_3/TSDWL/LARAVEL/iBook/resources/views/books/create.blade.php
+++ b/Year_3/TSDWL/LARAVEL/iBook/resources/views/books/create.blade.php
@@ -7,11 +7,11 @@
@csrf
<div>
<label for="name">Name: </label>
- <input type="text" name="name" id="name">
+ <input type="text" name="name" id="name" required>
</div>
<div>
<label for="published_at">Published at: </label>
- <input type="date" name="published_at" id="published_at">
+ <input type="datetime" name="published_at" id="published_at">
</div>
<div>
<label for="is_online">Is online?: </label>
@@ -19,8 +19,14 @@
</div>
<div>
<label for="author_id">Author: </label>
- <input type="text" name="name" id="name">
+ <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