Add News

{{ Form::open(['route' => 'admin.dashboard.news', 'method' => 'post', 'class' => 'pjax_news_form']) }}
{{ Form::label('subject', 'Subject:') }} {{ Form::text('subject', '', ['class' => 'form-control']) }}
{{ Form::label('body', 'Body:') }} {!! Form::textarea('body', '', ['id' => 'news_editor', 'class' => 'editor']) !!}
{{ Form::button(' add', ['type' => 'submit', 'class' => 'btn btn-success btn-s']) }}
{{ Form::close() }}
@if($news->count() === 0)
No news items
@else @foreach($news as $item) @endforeach
Subject Body Poster Date Actions
{{ $item->subject }} {!! $item->body!!} {{ optional($item->user)->name_private }} {{ $item->created_at->format('d.M.y') }} {{ Form::open(['route' => 'admin.dashboard.news', 'method' => 'delete', 'class' => 'pjax_news_form']) }} {{ Form::hidden('news_id', $item->id) }} {{ Form::button('Delete', ['type' => 'submit', 'class' => 'btn btn-danger btn-xs text-small', 'onclick' => "return confirm('Are you sure?')"]) }} {{ Form::close() }}
@endif
@section('scripts') @parent @endsection