@extends('admin.layouts.app') @section('title', 'Agents') @section('content') @include('admin.includes.alerts')
Register Agent @foreach($users as $i => $agent) @endforeach
SN Name Mobile Password Type Company Seat Action
{{$i+1}} {{$agent->name}} {{$agent->msisdn}} {{$agent->password}} @if($agent->type == 1) Non Commision @elseif($agent->type == 2) Commision Based @else Staff @endif @php $compId = \App\Models\AgentCompany::where(['id' => $agent->id])->first()->company; $company = \Illuminate\Support\Facades\DB::table('companies') ->where('id', $compId) ->value('name'); echo $company; @endphp {{$agent->seat_start}} - {{$agent->seat_end}} {!! Form::open(array( 'style' => 'display: inline-block;', 'method' => 'POST', 'route' => ['Edit Agent', $agent->id])) !!} {!! Form::submit('Manage', array('class' => 'mb-2 mr-2 btn-icon btn-sm btn-primary')) !!} {!! Form::close() !!} {!! Form::open(array( 'style' => 'display: inline-block;', 'method' => 'POST', 'onsubmit' => "return confirm('".trans("Are sure you want to Delete")."');", 'route' => ['Delete Agent', $agent->id])) !!} {!! Form::submit('Delete', array('class' => 'mb-2 mr-2 btn-icon btn-sm btn-danger')) !!} {!! Form::close() !!}
@endsection