<?php

namespace App\Http\Controllers;

use App\Models\Address;
use Illuminate\Http\Request;


class AddressController extends Controller
{
    // Return address as JSON for autofill
    public function show($id)
    {
        $address = Address::where('user_id', auth()->id())
            ->findOrFail($id);

        return response()->json($address);
    }
}