Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @extends('layouts.app')
- @section('content')
- <div class="flex justify-center">
- <div class="w-8/12 bg-gray-700 p-6 m-6">
- @auth
- <x-alert error="red" />
- <form action="{{route('posts.update', $post)}}" method="post">
- @method('PATCH')
- @csrf
- <div class="mb-4">
- <label for="body" class="sr-only">Body</label>
- <textarea name="body" class="border-2 w-full p-4 text-gray-900 focus:outline-none" placeholder="Post something cool...">{{$post->content}}</textarea>
- @error('body')
- <div class="text-red-500 mt-2 text-sm">
- {{ $message }}
- </div>
- @enderror
- </div>
- <div class="mb-4">
- <button type="submit" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">Submit</button>
- </div>
- </form>
- @endauth
- </div>
- </div>
- @endsection
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement