<?php

namespace App\Api\Http\Controllers\Api\V1\LeadStage;

use App\Api\Http\Resources\LeadStage\LeadStageCollection;
use App\Http\Controllers\Controller;
use App\LeadStage;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;

class LeadStageController extends Controller
{
    public function index(Request $request): JsonResponse
    {
        $source = LeadStage::where('status', 1)->get();
        return $this->success(
            'Lead Stages!',
            new LeadStageCollection($source)
        );
    }
}
