Frontend form for post create should be complete
This commit is contained in:
parent
e4dc59ab44
commit
f601abae7a
@ -18,6 +18,7 @@ public function create()
|
|||||||
|
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
|
dd($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function show($id)
|
public function show($id)
|
||||||
|
@ -1,28 +1,34 @@
|
|||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('pageTitle', 'Create new post - ')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-9 px-4">
|
<div class="col-md-9 px-4">
|
||||||
|
|
||||||
<form action="">
|
<h3>Create new post</h3>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<form action="{{route('posts.store')}}" method="post" id="createPostForm">
|
||||||
|
@csrf
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="title">Post Title</label>
|
<label for="title">Post Title</label>
|
||||||
<input type="email" class="form-control" id="title" name="title" required
|
<input type="text" class="form-control" id="title" name="title" required/>
|
||||||
placeholder="Enter post title"/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group mt-4">
|
<div class="form-group mt-4">
|
||||||
<label for="content">Post Content</label>
|
<label for="content">Post Content</label>
|
||||||
<div class="form-floating">
|
<div class="form-floating">
|
||||||
<textarea class="form-control" placeholder="Enter markdown here" id="content" required
|
<textarea class="form-control" placeholder="Enter markdown here" id="content" required
|
||||||
style="height: 200px"></textarea>
|
name="content" style="height: 200px"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<label for="file" class="form-label">Upload related pictures</label>
|
<label for="files" class="form-label">Upload pictures</label>
|
||||||
<input class="form-control" type="file" id="file">
|
<input class="form-control" type="file" id="files" name="files" multiple>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group mt-4">
|
<div class="form-group mt-4">
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<!-- CSRF Token -->
|
<!-- CSRF Token -->
|
||||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
|
|
||||||
<title>{{ config('app.name', 'Laravel') }}</title>
|
<title>@yield('pageTitle') {{ config('app.name', 'Laravel') }}</title>
|
||||||
|
|
||||||
<!-- Fonts -->
|
<!-- Fonts -->
|
||||||
<link rel="dns-prefetch" href="//fonts.bunny.net">
|
<link rel="dns-prefetch" href="//fonts.bunny.net">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user