@foreach(\App\User::whereHas('role', function (\Illuminate\Database\Eloquent\Builder $query) {
$query->where('name', '=', 'photographer');
})->get() as $index=>$photographer)
@if(\App\Gallery::where('user_id',$photographer->id)->where('status','Approved')->count() >0)
@if($index % 2 == 0)
@foreach($photographer->gallery->where('status','Approved') as $gallery)
->url(Storage::disk('public')->files($gallery->slug)[0])}})
@endforeach
@else
@foreach($photographer->gallery->where('status','Approved') as $gallery)
->url(Storage::disk('public')->files($gallery->slug)[0])}})
@endforeach
@endif
@endif
@endforeach
@endsection
@section('style')
@endsection