@extends('layouts.app') @section('content')
Search Contractors
{{ Form::open(['route' => 'client-management.search_contractor', 'id' => 'search_contractor']) }} {{ Form::label('Location:') }} {{ Form::select('location',$data['suburb'],$data['location']->suburb_id,['class' => 'form-control']) }} {{ Form::label('Service(s):') }}
{{-- Form::select('service',$data['services'],null,['class' => 'form-control']) --}} @foreach($data['services'] as $service) {{ Form::checkbox('services[]', $service) }} {{ $service }}.
@endforeach {{ Form::label('Price Range:') }}
{{-- Form::select('price_range',$data['price_ranges'],null,['class' => 'form-control']) --}} @foreach($data['price_ranges'] as $range) {{ Form::checkbox('price_range[]', $range) }} {{ $range }}.
@endforeach {{ Form::submit('Search', ['class' => 'btn btn-info btn-sm', 'style' => 'margin-top: 10px; float: right']) }} {{ Form::close() }}
@if(session()->has('message'))
{{ session()->get('message') }}
@endif
@foreach($data['contractors'] as $contractor)
{{ $contractor->company }} Place Request
Rate/h: R{{ $contractor->hourly_rate }}
Operating Hours: {{ $contractor->operating_hours }}
Service(s):
    @if(count($contractor->services) > 0) @foreach($contractor->services as $service) @foreach($data['services'] as $key => $dservice) @if($key == $service->service_id)
  • {{ $dservice}}
  • @endif @endforeach @endforeach @else
  • List of Services
  • List of Services
  • List of Services
  • @endif
@endforeach
@if(count($data['contractors']) > 0) {{ $data['contractors']->links() }} @endif
@endsection @section('scripts') @endsection