@extends('layouts.app') @section('title', 'API Targets') @section('breadcrumb') @endsection @section('content')

API Targets

Add New Target
Total Targets
{{ $api_targets->total() }}
Active Targets
{{ $api_targets->where('is_active', true)->count() }}
Manual Targets
{{ $api_targets->where('schedule_type', 'manual')->count() }}
Scheduled Targets
{{ $api_targets->where('schedule_type', '!=', 'manual')->count() }}
API Targets List
@if($api_targets->count() > 0)
@foreach($api_targets as $target) @endforeach
Name URL Method Source Table Status Schedule Last Sent Actions
{{ $target->name }}
@if($target->description)
{{ Str::limit($target->description, 50) }}
@endif
{{ $target->base_url }}
{{ $target->endpoint }}
{{ $target->method }} {{ $target->source_table }} {{ $target->is_active ? 'Active' : 'Inactive' }} {{ ucfirst($target->schedule_type) }} @if($target->schedule_frequency && $target->schedule_type !== 'manual')
Every {{ $target->schedule_frequency }} {{ $target->schedule_type == 'hourly' ? 'hour(s)' : ($target->schedule_type == 'daily' ? 'day(s)' : 'week(s)') }}
@endif
@if($target->last_sent_at)
{{ $target->last_sent_at->format('d M Y') }}
{{ $target->last_sent_at->format('H:i:s') }}
@else Never @endif
Showing {{ $api_targets->firstItem() }} to {{ $api_targets->lastItem() }} of {{ $api_targets->total() }} results
{{ $api_targets->links() }}
@else

No API Targets Found

Start by creating your first API target to send data to external APIs.

Create Your First API Target
@endif
@endsection @section('scripts') @endsection