@extends('themes.default1.agent.layout.agent') @extends('themes.default1.agent.layout.sidebar') @section('Tools') class="nav-link active" @stop @section('tool') class="active" @stop @section('kb') class="nav-link active" @stop @section('add-article') class="nav-link active" @stop @section('article') class="nav-link active" @stop @section('article-menu-open') class="nav nav-treeview menu-open" @stop @section('article-menu-parent') class="nav-item menu-open" @stop @section('PageHeader')

{{Lang::get('lang.article')}}

@stop @section('content') {!! Form::open(array('action' => 'Agent\kb\ArticleController@store' , 'method' => 'post') )!!} @if(Session::has('success'))
{{Session::get('success')}}
@endif @if(Session::has('fails'))
{!! Lang::get('lang.alert') !!} ! {{Session::get('fails')}}
@endif @if(!$category)
{!! Lang::get('lang.create_a_category') !!}
@endif @if(Session::has('errors'))
{!! Lang::get('lang.alert') !!}!
@if($errors->first('name'))
  • {!! $errors->first('name', ':message') !!}
  • @endif @if($errors->first('slug'))
  • {!! $errors->first('slug', ':message') !!}
  • @endif @if($errors->first('description'))
  • {!! $errors->first('description', ':message') !!}
  • @endif @if($errors->first('type'))
  • {!! $errors->first('type', ':message') !!}
  • @endif @if($errors->first('status'))
  • {!! $errors->first('status', ':message') !!}
  • @endif @if($errors->first('category_id'))
  • {!! $errors->first('category_id', ':message') !!}
  • @endif
    @endif

    {!! Lang::get('lang.addarticle') !!}

    {!! Form::label('name',Lang::get('lang.name')) !!} * {!! Form::text('name',null,['class' => 'form-control']) !!}
    {!! Form::label('description',Lang::get('lang.description')) !!} *
    {!! Form::textarea('description',null,['class' => 'form-control article_desc','id'=>'editor','size' => '128x20','placeholder'=>Lang::get('lang.enter_the_description')]) !!}

    {{Lang::get('lang.publish')}}

    {!! Form::label('type',Lang::get('lang.status')) !!}
    {!! Form::radio('type','1',true) !!}
    {{Lang::get('lang.published')}}
    {!! Form::radio('type','0',null) !!}
    {{Lang::get('lang.draft')}}
    {!! Form::label('status',Lang::get('lang.visibility')) !!}
    {!! Form::radio('status','1',true) !!}
    {{Lang::get('lang.public')}}
    {!! Form::radio('status','0',null) !!}
    {{Lang::get('lang.private')}}
    first()->date_time_format; $format = \App\Model\helpdesk\Utility\Date_time_format::where('id', $format)->first()->format; $tz = App\Model\helpdesk\Settings\System::where('id', '1')->first()->time_zone; $tz = App\Model\helpdesk\Utility\Timezones::where('id', $tz)->first()->name; date_default_timezone_set($tz); $date = date($format); $dateparse = date_parse_from_format($format, $date); //dd($dateparse); $month = $dateparse['month']; $day = $dateparse['day']; $year = $dateparse['year']; $hour = $dateparse['hour']; $minute = $dateparse['minute']; // echo $date; ?>
    {!! Form::label('month',Lang::get('lang.publish_immediately')) !!}
    {!! Form::selectMonth('month', $month,['class'=>'form-control mr-1','style'=>'width: 120px;']) !!} {!! Form::selectRange('day', 1, 31, $day,['class'=>'form-control mr-1','style'=>'width: 65px;']) !!} {!! Form::text('year',date('Y'),['class'=>'form-control mr-1','style'=>'width: 58px;']) !!}@   : 

    {{Lang::get('lang.category')}} *

    {{-- {!! Form::label('category_id','Category') !!} --}} @foreach($category->toArray() as $key=>$val)
    @endforeach
    {!! Form::close() !!}
    @stop