<?php if(isset($division)): ?>
    <?php echo Form::model($division, ['url' => "division/$division->id", 'method' => 'put', 'class' => 'form-horizontal']); ?>

<?php else: ?>
    <?php echo Form::open(['url' => 'division', 'method' => 'post', 'class' => 'form-horizontal']); ?>

<?php endif; ?>

<div class="required form-group <?php echo e($errors->has('name') ? 'has-error' : ''); ?>">
    <?php echo Form::label('name', 'Division', ['class' => 'col-xs-3 col-sm-3 control-label']); ?>

    <div class="col-xs-9 col-sm-9">
    	<div class="col-xs-12 col-sm-12">
	        <?php echo Form::text('name', null, ['class' => 'form-control', 'placeholder' => 'Enter Division', 'autocomplete' => 'off']); ?>

	        <span class="text-danger">
			    <?php echo e($errors->first('name')); ?>

		    </span>
		</div>
    </div>
</div>

<div class="form-group">
    <div class="col-xs-12 col-sm-12">
        <?php echo Form::submit('Submit', ['class' => 'btn btn-primary btn-block']); ?>

    </div>
</div>
<?php echo Form::close(); ?>