/
home
/
obinna
/
html
/
cravings
/
resources
/
views
/
Upload File
HOME
<form action="/places/search" method="GET"> <input type="hidden" name="found" id="found"> <div class="input-group"> <input type="text" class="form-control place-find" name="place" placeholder="Find place..."> <div class="input-group-addon" style="padding: 0;"> <button class="btn btn-primary" style="border-radius: 0;">Find</button> </div> </div> </form> <table class="table table-striped"> <thead> <tr> {{-- <td>Img</td> --}} <td>Name</td> <td>Location</td> </tr> </thead> <tbody> @foreach ($places as $place) @if($current) @php $name = e($current); $match = array_filter($place['food'], function($food) use ($name){ return strpos(strtolower($food['name']), strtolower($name)) !== false; }); $matchname = array_values($match)[0]['name']; @endphp @endif <tr> {{-- <td><img style="width: 100px;" class="card-img-top" src="{{ asset($url)}}" alt="Place Image"></td> --}} <td><a href="{{ route('places.show', ['id' => $place->slug]) }}" class="title-link">{{ $place->name }}</a></td> <td> {{ $place->address }}<br> @if ($current) <span class="badge badge-warning">{{ $matchname }}</span> @endif </td> </tr> @endforeach <tr> <td colspan="3" class="text-center"> {{ $places->links() }} </td> </tr> </tbody> </table>