- Adds Character model with survival needs (hunger, thirst, energy) and state machine - Implements city:tick world ticker for offline progression every minute - Adds city territory expansion and building construction system - Introduces job economy, inventory, and transaction audit trail - Adds social graph (friends, marriage, children) and character chat - Implements admin approval workflow for new registrations - Adds hospital admission system for traffic accidents - Includes comprehensive feature tests and world seeders
56 lines
2.8 KiB
PHP
Executable File
56 lines
2.8 KiB
PHP
Executable File
@extends('layouts.app')
|
|
|
|
@section('title', __('admin.cities.title'))
|
|
|
|
@section('content')
|
|
<div style="max-width: 960px; margin: 0 auto;">
|
|
<div class="card" style="margin-bottom:1.25rem;">
|
|
<h1 style="margin-top:0; color:#fff;">🗺️ {{ __('admin.cities.title') }}</h1>
|
|
@if (session('status'))
|
|
<p style="color:#4ade80;">{{ session('status') }}</p>
|
|
@endif
|
|
@if ($errors->any())
|
|
<p style="color:var(--danger);">{{ $errors->first() }}</p>
|
|
@endif
|
|
<p style="color:var(--muted);">{{ __('admin.cities.hint') }}</p>
|
|
|
|
<form method="POST" action="{{ route('admin.cities.store') }}" style="display:flex; gap:.6rem; margin-top:1rem; flex-wrap:wrap;">
|
|
@csrf
|
|
<input type="text" name="name" required maxlength="120" placeholder="{{ __('admin.cities.name') }}"
|
|
style="flex:1; min-width:200px; padding:.6rem .8rem; border-radius:.55rem; border:1px solid var(--border); background:#0b1220; color:var(--text);">
|
|
<button type="submit" class="btn btn-primary">{{ __('admin.cities.create') }}</button>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<table style="width:100%; border-collapse:collapse; color:var(--muted);">
|
|
<thead>
|
|
<tr style="text-align:left; border-bottom:1px solid var(--border);">
|
|
<th style="padding:.5rem;">{{ __('admin.cities.name') }}</th>
|
|
<th style="padding:.5rem;">{{ __('admin.cities.bounds') }}</th>
|
|
<th style="padding:.5rem;">{{ __('admin.cities.expansions') }}</th>
|
|
<th style="padding:.5rem;">{{ __('admin.citizens.actions') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($cities as $city)
|
|
<tr style="border-bottom:1px solid var(--border);">
|
|
<td style="padding:.5rem; color:#fff;">{{ $city->name }} @if($city->is_active)<span class="badge badge-user">ativo</span>@endif</td>
|
|
<td style="padding:.5rem;">
|
|
X [{{ $city->bounds_min_x }}, {{ $city->bounds_max_x }}] ·
|
|
Z [{{ $city->bounds_min_z }}, {{ $city->bounds_max_z }}]
|
|
</td>
|
|
<td style="padding:.5rem;">{{ $city->expansions }}/{{ \App\Models\City::MAX_EXPANSIONS }}</td>
|
|
<td style="padding:.5rem;">
|
|
<form method="POST" action="{{ route('admin.cities.expand', $city) }}">
|
|
@csrf
|
|
<button type="submit" class="btn">{{ __('admin.cities.expand') }}</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
@endsection |