Created
April 28, 2017 14:14
-
-
Save cyberfly/6ebbcc0b649b73f110262d381f39eece to your computer and use it in GitHub Desktop.
Laravel Collective Real World Example, with Class, ID, File Upload, and Custom Method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{!! Form::open(['route' => 'tickets.store','class' => 'form-horizontal', 'files' => true]) !!} | |
{!! Form::label('state_id', 'State') !!} | |
{!! Form::text('product_name','',['class'=>'form-control']); !!} | |
{!! Form::radio('condition', 'new', true); !!} New | |
{!! Form::radio('condition', 'used', false); !!} Used | |
{!! Form::select('state_id', $states, null, ['placeholder' => 'Select State','class'=>'form-control','id'=>'state_id']); !!} | |
{!! Form::close() !!} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{!! Form::open(['route' => ['tickets.update',$ticket->id],'class' => 'form-horizontal', 'method'=>'PUT', 'files' => true]) !!} | |
{!! Form::text('ticket_subject',$ticket->ticket_subject,['class'=>'form-control']) !!} | |
{!! Form::select('category_id',$categories,$ticket->category_id,['class'=>'form-control']) !!} | |
{!! Form::close() !!} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@foreach($tickets as $ticket) | |
<tr> | |
<td> | |
<a href="{!! route('tickets.show',$ticket->id) !!}" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-zoom-in" aria-hidden="true"></span></a> | |
<a href="{!! route('tickets.edit',$ticket->id) !!}" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a> | |
</td> | |
</tr> | |
@endforeach |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment