Files
laravel-llm-gateway/laravel-app/resources/views/model-pricing/index.blade.php
wtrinkl bef36c7ca2 Rename project from any-llm to laravel-llm
- Remove old any-llm related files (Dockerfile, config.yml, web/, setup-laravel.sh)
- Update README.md with new Laravel LLM Gateway documentation
- Keep docker-compose.yml with laravel-llm container names
- Clean project structure for Laravel-only implementation
2025-11-18 22:05:05 +01:00

117 lines
7.0 KiB
PHP

<x-app-layout>
<x-slot name="header">
<div class="flex justify-between items-center">
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
Model Pricing
</h2>
<div class="flex space-x-2">
<a href="{{ route('model-pricing.calculator') }}"
class="bg-purple-500 hover:bg-purple-700 text-white font-bold py-2 px-4 rounded">
Cost Calculator
</a>
<a href="{{ route('model-pricing.import-form') }}"
class="bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded">
Import CSV
</a>
<a href="{{ route('model-pricing.create') }}"
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
Add New Model
</a>
</div>
</div>
</x-slot>
<div class="py-12">
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
@if(session('success'))
<div class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded relative mb-4">
{{ session('success') }}
</div>
@endif
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
<div class="p-6 text-gray-900">
@if($modelPricing->count() > 0)
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Provider
</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Model
</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">
Input Price
</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">
Output Price
</th>
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">
Status
</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">
Actions
</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
@foreach($modelPricing as $model)
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">
{{ $model->provider }}
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">
{{ $model->model }}
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-right text-blue-600 font-semibold">
{{ $model->input_price_formatted }}
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-right text-green-600 font-semibold">
{{ $model->output_price_formatted }}
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-center">
@if($model->is_active)
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">
Active
</span>
@else
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800">
Inactive
</span>
@endif
</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<a href="{{ route('model-pricing.edit', $model->id) }}"
class="text-indigo-600 hover:text-indigo-900 mr-3">Edit</a>
<form action="{{ route('model-pricing.destroy', $model->id) }}"
method="POST" class="inline"
onsubmit="return confirm('Are you sure?');">
@csrf
@method('DELETE')
<button type="submit" class="text-red-600 hover:text-red-900">Delete</button>
</form>
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4">
{{ $modelPricing->links() }}
</div>
@else
<div class="text-center py-12">
<svg class="mx-auto h-12 w-12 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<h3 class="mt-2 text-sm font-medium text-gray-900">No model pricing found</h3>
<p class="mt-1 text-sm text-gray-500">Get started by adding a new model pricing.</p>
</div>
@endif
</div>
</div>
</div>
</div>
</x-app-layout>