@extends('main')
@section('title' , '| Edytuj Post')
@section('content')
@section('stylesheets')
{!! Html::style('css/parsley.css') !!}
{!! Html::style('css/select2.min.css') !!}
@endsection
@if(session('error'))
{!! Form::model($post, ['route' => ['posts.update' , $post->id] , 'method' => 'PUT']) !!}
{{ Form::label('title' , 'Tytuł:') }}
{{ Form::text('title' , null , ['class' => 'form-control']) }}
{{ Form::label('slug' , 'Slug:' , ['class' => 'form-spacing-top']) }}
{{ Form::text('slug' , null , ['class' => 'form-control']) }}
{{ Form::label('category_id' , 'Kategoria:') }}
{{ Form::select('category_id' , $categories , null , ['class' => 'form-control'] ) }}
{{ Form::label('tags' , 'Tag:' , ['class' => 'form-spacing-top']) }}
{{ Form::select('tags[]' , $tags, null, ['class' => 'form-control select2-multi' , 'multiple' => 'multiple']) }}
{{ Form::label('body' , 'Treść:' , ['class' => 'form-spacing-top']) }}
{{ Form::textarea('body' , null , ['class' => 'form-control']) }}
- Utworzony:
- {{ date('M j, Y h:ia' , strtotime($post->created_at)) }}
- Kategoria:
- {{ $post->category->name }}
- Ostatnia aktualizacja:
- {{ date('M j, Y h:ia ' , strtotime($post->updated_at)) }}
{!! Html::linkRoute('posts.show' , 'Cofnij' , array($post->id) , array('class' => 'btn btn-danger btn-block')) !!}
{{ Form::submit('Zapisz Zmiany' , ['class' => 'btn btn-success btn-block']) }}
{!! Form::close() !!}
@endsection
@section('scripts')
{!! Html::script('js/parsley.min.js') !!}
{!! Html::script('js/select2.min.js') !!}
@endsection