<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Http\Resources\CompanyResource;
use App\Models\Company;

class CompanyApiController extends Controller
{
    public function index()
    {
        return CompanyResource::collection(Company::active()->orderBy('sort_order')->get());
    }

    public function show(Company $company)
    {
        return new CompanyResource($company);
    }
}
