@extends('layouts.admin.master') @php $id = request()->route('blog'); $edit = !empty($id); $title = $edit ? 'Edit Blog' : 'Add Blog'; @endphp @section('title') {{ $title }} @endsection @push('css') @endpush @section('content')

{{ $title }}

Fill in the details to {{ $edit ? 'update' : 'create' }} a blog post

Back
@csrf @if($edit) @method('PUT') @endif
@error('name') {{ $message }} @enderror
Allowed types: JPG, JPEG, PNG, PDF, DOC, DOCX
@if($edit && $blog->attachments->count())
Existing Attachments:
@foreach($blog->attachments as $attachment)
{{ $attachment->original_name }} ({{ $attachment->formatted_file_size }})
@endforeach
@endif @error('attachments') {{ $message }} @enderror @error('attachments.*') {{ $message }} @enderror
@error('blog_category_id') {{ $message }} @enderror
Thumbnail @error('thumbnail_image') {{ $message }} @enderror
@error('description') {{ $message }} @enderror
@endsection @push('js') @endpush