@extends('backend.layouts.app') @section('content')
{{ html()->form('POST', route('backend.blog.store'))->attributes(['enctype' => 'multipart/form-data', 'data-toggle' => 'validator', 'id' => 'blog'])->open() }} {{ html()->hidden('id', $blogdata->id ?? null) }}
{{ html()->label(trans('messages.title') . ' *', 'title')->class('form-label') }} {{ html()->text('title', $blogdata->title)->placeholder(trans('messages.title'))->class('form-control')->required() }}
@if(auth()->user()->hasAnyRole(['admin','demo_admin']))
{{ html()->label(__('messages.select_name', ['select' => __('messages.author')]), 'author_id')->class('form-label') }}
{{ html()->select('author_id', $vendors->pluck('full_name', 'id')->toArray(), $blogdata->author_id ?? null) ->class('form-control select2js') ->id('author_id') ->attribute('data-placeholder', __('messages.select_name', ['select' => __('messages.author')])) }}
@endif
@if(isset($blogdata) && $blogdata->getMedia('blog_attachment')->isNotEmpty())
    @foreach($blogdata->getMedia('blog_attachment') as $media)
  • Blog Image
  • @endforeach
@endif
{{ html()->label(__('messages.status'), 'status')->class('form-label mb-0') }}
{{ html()->hidden('status', 0) }} {{ html()->checkbox('status', old('status', $blogdata->status ?? 1)) ->class('form-check-input') ->id('status') ->value(1) }}
@error('status') {{ $message }} @enderror
{{ html()->label(__('messages.description'), 'description')->class('form-control-label') }} {{ html()->textarea('description',$blogdata->description)->class('form-control tinymce-template')->placeholder(__('messages.description')) }}
{{ html()->submit(trans('messages.save'))->class('btn btn-md btn-primary float-end') }} {{ html()->form()->close() }}
@endsection @section('bottom_script') @push('after-scripts') @endpush @endsection