Skip to content

Commit

Permalink
add landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanni8 committed Apr 2, 2024
1 parent e5f78da commit b77498d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/SetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public function import(Import $request)

$data = trim($data);
$set = Set::create([
"title" => "Imported Set",
"description" => "Lorem ipsum dolor sit amet, consetetur sadipscing",
"title" => $request->string("title"),
"description" => $request->string("description"),
"user_id" => auth()->id(),
]);

Expand Down
4 changes: 3 additions & 1 deletion app/Http/Requests/Set/Import.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ public function authorize(): bool
public function rules(): array
{
return [
"export" => ["required", "string"]
"export" => ["required", "string"],
"title" => ["required", "string", "max:255"],
"description" => ["required", "string"],
];
}
}
21 changes: 20 additions & 1 deletion resources/js/Pages/Set/Import.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
<template>
<form-group title="Import Collection" class="max-w-full">
<textarea name="export" class="bg-[#333333] px-4 py-2 rounded-md w-2/3 h-60" required></textarea>
<form-input
label="Title"
name="title"
placeholder="My Awesom collection"
type="text"
required
></form-input>
<form-input
name="description"
label="Description"
placeholder="A test collection"
type="text"
required
></form-input>
<textarea
name="export"
class="bg-[#333333] px-4 py-2 rounded-md w-2/3 h-60"
placeholder="The key value pairs go here..."
required
></textarea>
</form-group>
</template>
<script>
Expand Down

0 comments on commit b77498d

Please sign in to comment.