Level 7
I've search for this solution as well a few times, the only thing I could come up with last was:
$countries = Country::orderBy('name')->get();
$applicationId = $this->applicationId;
$countries->load(['resorts' => function($query) use ($applicationId) {
$query->where('application_id', $applicationId);
}]);
foreach($countries as $country)
{
if($country->resorts)
{
foreach($country->resorts as $resort)
{
$options[$country->name][$resort->id] = $resort->name;
}
}
}
Use the options array in your view
{{ Form::select('resort_id', [null + $options], null) }}
//Using [null + $options] is an nice way to have a blank first value in a select box