<?php $__env->startSection('title'); ?> Update Tenant <?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>

<div class='col-lg-4 col-lg-offset-4'>

    <h1><i class='fa fa-user'></i> Edit Tenant</h1>

    <?php echo Form::model($user->toArray() + $tenant->toArray(), ['role' => 'form',
        'action' => array('TenantController@update', $building->id, $user->id), 'method' => 'PUT']); ?>


    <div class='form-group'>
        <?php echo Form::label('username', 'Username'); ?>

        <?php echo Form::text('username', null, ['placeholder' => 'Username', 'class' => 'form-control', 'required']); ?>


        <?php if($errors->has('test')): ?>
        <div class='bg-danger alert'><?php echo $errors->first('test'); ?></div>
        <?php endif; ?>
    </div>

    <div class='form-group'>
        <?php echo Form::label('password', 'Password'); ?>

        <?php echo Form::text('password', null, ['placeholder' => 'Password', 'class' => 'form-control', 'required']); ?>


        <?php if($errors->has('password')): ?>
        <div class='bg-danger alert'><?php echo $errors->first('password'); ?></div>
        <?php endif; ?>
    </div>

    <div class='form-group'>
        <?php echo Form::label('first_name', 'First Name'); ?>

        <?php echo Form::text('first_name', null, ['placeholder' => 'First Name', 'class' => 'form-control', 'required']); ?>


        <?php if($errors->has('first_name')): ?>
        <div class='bg-danger alert'><?php echo $errors->first('first_name'); ?></div>
        <?php endif; ?>
    </div>

    <div class='form-group'>
        <?php echo Form::label('last_name', 'Last Name'); ?>

        <?php echo Form::text('last_name', null, ['placeholder' => 'Last Name', 'class' => 'form-control', 'required']); ?>


        <?php if($errors->has('last_name')): ?>
        <div class='bg-danger alert'><?php echo $errors->first('last_name'); ?></div>
        <?php endif; ?>
    </div>

    <div class='form-group'>
        <?php echo Form::label('apartment', 'Apartment'); ?>

        <?php echo Form::text('apartment', null, ['placeholder' => 'Apartment', 'class' => 'form-control', 'required']); ?>


        <?php if($errors->has('apartment')): ?>
        <div class='bg-danger alert'><?php echo $errors->first('apartment'); ?></div>
        <?php endif; ?>
    </div>

    <div class='form-group'>
        <?php echo Form::submit('Update Tenant', ['class' => 'btn btn-primary']); ?>

    </div>

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


</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>