Advertisement
MrGoatsy

Untitled

Mar 3rd, 2021
1,095
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.13 KB | None | 0 0
  1. @extends('layouts.app')
  2.  
  3. @section('content')
  4.     <div class="flex justify-center">
  5.         <div class="w-8/12 bg-gray-700 p-6 m-6">
  6.             @auth
  7.                 <x-alert error="red" />
  8.                 <form action="{{route('posts.update', $post)}}" method="post">
  9.                     @method('PATCH')
  10.                     @csrf
  11.                     <div class="mb-4">
  12.                         <label for="body" class="sr-only">Body</label>
  13.                         <textarea name="body" class="border-2 w-full p-4 text-gray-900 focus:outline-none" placeholder="Post something cool...">{{$post->content}}</textarea>
  14.                     @error('body')
  15.                         <div class="text-red-500 mt-2 text-sm">
  16.                             {{ $message }}
  17.                         </div>
  18.                     @enderror
  19.                     </div>
  20.                     <div class="mb-4">
  21.                         <button type="submit" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">Submit</button>
  22.                     </div>
  23.                 </form>
  24.             @endauth
  25.         </div>
  26.     </div>
  27. @endsection
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement