Skip to content

Instantly share code, notes, and snippets.

@randomdrake
Created February 22, 2014 21:30
Show Gist options
  • Save randomdrake/9162709 to your computer and use it in GitHub Desktop.
Save randomdrake/9162709 to your computer and use it in GitHub Desktop.
{{ Form::open(['url' => '/tasks', 'class' => 'form']) }}
<div class="form-group {{ $errors->first('title', 'has-error') }}">
{{ Form::label('title', 'Title:', ['class' => 'control-label']) }}
{{ Form::text('title', null, ['class' => 'form-control']) }}
{{ $errors->first('title', '<span class=alert-danger>:message</span>') }}
</div>
<div class="form-group {{ $errors->first('body', 'has-error') }}">
{{ Form::label('body', 'Body:', ['class' => 'control-label' ]) }}
{{ Form::textarea('body', null, ['class' => 'form-control']) }}
{{ $errors->first('body', '<span class=alert-danger>:message</span>') }}
</div>
<div class="form-group" {{ $errors->first('assign') ? 'class="has-error"' : '' }} >
{{ Form::label('assign', 'Assign To:', ['class' => 'control-label']) }}
{{ Form::select('assign', $users, null, ['class' => 'form-control']) }}
{{ $errors->first('assign', '<span class=alert-danger>:message</span>') }}
</div>
<div class="form-group">
{{ Form::submit('Create Task', ['class' => 'btn btn-primary']) }}
</div>
{{ Form::close() }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment