<?php

namespace App\Http\Controllers\Legacy;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Support\AvatarUrl;

class AvatarController extends Controller
{
    public function show(Request $request, $id, $name = null)
    {
        $userId = (int) $id;
        $target = AvatarUrl::forUser($userId, null, 128);

        return redirect()->away($target, 301);
    }
}
