I am doing project in laravel 5.2, for report creation in "vehicleDetail.blade.php" i need to give one drop down option, in that i need to get vehicle names which are there in the database. From that list if i select one vehicle, select fromDate , toDate and then click on generate report i should be able to fetch data from the database (device table). For this filter engine how can i make the drop down list byb fetching data fro the database?
vehicleDetail.blade.php
@extends('app')
@section('content')
<br><br><br><br><br>
<div class="templatemo-content-wrapper">
<div class="container">
<ol class="breadcrumb">
<li><a href="{{ url("/") }}"><font color="green">Home</font></a></li>
<li class="active">Vehicle Detail</li>
</ol>
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-success">
<div class="panel-heading">Vehicle Detail</div>
<div class="panel-body">
@if (count($errors) > 0)
<div class="alert alert-danger">
<strong>Whoops!</strong> There were some problems with your input.<br><br>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<form class="form-horizontal" role="form" method="POST" action="{{ url('group/update/') }}">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<div class="form-group">
<label class="col-md-4 control-label">Vehicle</label>
<div class="col-md-6">
<input type="text" class="form-control" name="groupID" value="{{ ('#')}}">
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">From Date</label>
<div class="col-md-6">
<input type="date" class="form-control" name="Fdate">
</div>
<label class="col-md-4 control-label">To Date</label>
<div class="col-md-6">
<input type="date" class="form-control" name="Tdate" >
</div>
</div>
<div class="form-group">
<div class="col-md-6 col-md-offset-4">
<button type="submit" class="btn btn-warning">
Get Report
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
Any one please help me to do this, response are appreciable.