Artem Petrov 5 лет назад
Родитель
Сommit
7c68693a31

+ 15 - 0
app/Http/Requests/PostRequest.php

@@ -0,0 +1,15 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: artem
+ * Date: 21.09.18
+ * Time: 21:39
+ */
+
+namespace App\Http\Requests;
+
+
+class PostRequest
+{
+
+}

+ 5 - 0
resources/views/posts/create.blade.php

@@ -0,0 +1,5 @@
+<form method="post" action="{{route('posts.create')}}">
+    {{csrf_token()}}
+    <input name="title"/>
+    <input name="description"/>
+</form>

+ 7 - 0
resources/views/posts/view.blade.php

@@ -0,0 +1,7 @@
+@foreach($posts as $post)
+    <div class="post">
+
+        <h1><a href="/posts/{{$post->id}}">{{$post->title}}</a></h1>
+        <div>{{$post->description}}</div>
+    </div>
+@endforeach