@extends('admin.layout.main') @section('title', 'Add Animation') @section('content')

{{ isset($animation) ? 'Edit Animation' : 'Add Animation' }}

Back
@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif @if(isset($animation)) {!! Form::model($animation, ['route' => ['animations.update', $animation->id], 'method' => 'PUT', 'files' => true]) !!} @else {!! Form::open(['route' => 'animations.store', 'method' => 'POST', 'files' => true]) !!} @endif
{!! Form::label('name', 'Name') !!} {!! Form::text('name', null, ['class' => 'form-control', 'required']) !!}
{!! Form::label('reason', 'Reason') !!} {!! Form::select('reason', ['win' => 'Win', 'loss' => 'Loss'], null, ['class' => 'form-control', 'required']) !!}
{!! Form::label('file_path', 'File') !!} {!! Form::file('file_path', ['class' => 'form-control']) !!} @if(isset($animation) && $animation->path)

Current file: {{ basename($animation->path) }}

@endif
{!! Form::label('status', 'Status') !!} {!! Form::select('status', [1 => 'Active', 0 => 'Inactive'], isset($animation) ? $animation->status : 1, ['class' => 'form-control', 'required']) !!}
{!! Form::close() !!}
@endsection