@extends('user.layouts.app') @section('content') @php $categoryList = ''; $mode = (!empty($data['topic_id'])) ? "Edit" : "Add"; @$topic_id = @$data['topic_id']; if($mode == 'Edit') { $topic_detail = $data['topic_detail']; } @endphp
Home
Forum
{{$mode == 'Add' ? 'Post New Topic' : 'Edit Topic'}}
{{$mode == 'Add' ? 'Post New Topic' : 'Edit Topic'}}
@include('user.includes.status')
{{ csrf_field() }}
All fields with star (
*
) are required
This post is mostly about (Category)
*
-- Select Category --
@if(isset($data['category'])) @foreach($data['category'] as $cat)
main_cat,$cat->id) }} {{ is_selected(old('category_id'),$cat->id) }}>{{ $cat->title }}
@endforeach @endif
@if($errors->has('category')){{ $errors->first('category') }}@endif
@if($mode == 'Edit')
Select Sub Category
*
-- Select Sub Category --
@if(isset($topic_detail['sub_cat'])) @foreach($topic_detail['sub_cat'] as $cat)
forum_category_id,$cat->id) }} {{ is_selected(old('category_id'),$cat->id) }}>{{ $cat->title }}
@endforeach @endif
Choose Forum Tags (You can select multiple tag using ctrl+select)
Choose your tag
@foreach($topic_detail['cat_tags'] as $tag) @php $selected = ""; if(!empty($topic_detail['tags'])) { $selected = in_array($tag['id'], custom_explode($topic_detail['tags'])) ? "selected" : "not"; } @endphp
{{ $tag->title }}
@endforeach
@endif
Post Title
*
title : old('title') }}" class="form-control" placeholder="Enter title here...">
@if($errors->has('title')){{ $errors->first('title') }}@endif
Description
*
{!! ($mode == "Edit") ? $topic_detail->description : old('ft_desc') !!}
@if($errors->has('ft_desc')){{ $errors->first('ft_desc') }}@endif
Notify Me of Replies
*
notify_me_of_replies,'1') : "checked" }} required="" />
Yes
notify_me_of_replies,'0') : "" }} />
No
@if($errors->has('notify_me_of_replies')){{ $errors->first('notify_me_of_replies') }}@endif
{{$mode}} Topic
Please ensure this post adheres to our
community guidelines
@include('user/includes/forumSidebar')
@endsection @section('scripts') @stop