- 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
39 lines
902 B
PHP
Executable File
39 lines
902 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Http\Controllers\Web;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\View\View;
|
|
|
|
/**
|
|
* Account lifecycle screens for registration approval.
|
|
*/
|
|
class AccountController extends Controller
|
|
{
|
|
/**
|
|
* Show the wait screen for pending registrations.
|
|
*/
|
|
public function pending(Request $request): View|RedirectResponse
|
|
{
|
|
$user = $request->user();
|
|
|
|
if ($user === null) {
|
|
return redirect()->route('login');
|
|
}
|
|
|
|
if ($user->status === 'active') {
|
|
return redirect()->route('dashboard');
|
|
}
|
|
|
|
if ($user->status === 'banned') {
|
|
auth()->guard('web')->logout();
|
|
$request->session()->invalidate();
|
|
|
|
return redirect()->route('login')->withErrors(['email' => __('auth.disabled')]);
|
|
}
|
|
|
|
return view('auth.pending');
|
|
}
|
|
}
|