@extends('layouts.master') @section('title') Create Security @stop @section('content')

Edit Security

{{ Form::model($user->toArray() + $security->toArray(), ['role' => 'form', 'action' => array('SecurityController@update', $security->id), 'method' => 'PUT']) }}
{{ Form::label('username', 'Username') }} {{ Form::text('username', null, ['placeholder' => 'Username', 'class' => 'form-control', 'required']) }} @if ($errors->has('username'))
{{ $errors->first('username') }}
@endif
{{ Form::label('password', 'Password') }} {{ Form::text('password', null, ['placeholder' => 'Password', 'class' => 'form-control', 'required']) }} @if ($errors->has('password'))
{{ $errors->first('password') }}
@endif
{{ Form::label('name', 'Name') }} {{ Form::text('name', null, ['placeholder' => 'Name', 'class' => 'form-control', 'required']) }} @if ($errors->has('name'))
{{ $errors->first('name') }}
@endif
@if (empty($buildings))

No Buildings

@else

Buildings

@if ($errors->has('buildings'))
{{ $errors->first('buildings') }}
@endif
@foreach ($buildings as $b) {{ Form::checkbox('building_group[]', $building->id, $b['selected'], array('id' => 'building' . $building->id)) }} {{ Form::label('building' . $building->id, $building->address) }}
@endforeach
@endif
{{ Form::submit('Update Security', ['class' => 'btn btn-primary']) }}
{{ Form::close() }}
@stop