<?php

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

use App\Api\Http\Resources\ProjectType\ProjectTypeCollection;
use App\Http\Controllers\Controller;
use App\ProjectType;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
use Spatie\QueryBuilder\QueryBuilder;

class ProjectTypeController extends Controller
{
    public function index(Request $request)
    {
        $projectTypes = ProjectType::where('status', 1)->get();
        return response()->json([
            'status' => true,
            'project_types' => $projectTypes,
        ]);

        // return $this->success(
        //     'project Type!',
        //     new ProjectTypeCollection($projectType)
        // );
    }
}
