@extends('backend.layouts.master') @section('title') Agents @endsection @section('main-content') @include('backend.layouts.notification')
Agents
@if(count($agents)>0) @foreach($agents as $agent) @php $product_info=DB::table('products')->select('title')->where('id',$agent->product_id)->get(); @endphp @endforeach
ID Name Email Product Photo Status Action
{{$agent->id}} {{$agent->name}} {{$agent->email}} {{$agent->products}} @if($agent->photo) {{ Storage::url($agent->photo) }} @else avatar.png @endif @if($agent->status=='approved') {{$agent->status}} @else {{$agent->status}} @endif
@csrf @method('delete')
@else
No agents found!!! Please add agent
@endif
@endsection