<?php

namespace App\Api\Http\Controllers\Api\V2\Quarter;

use App\Api\Http\Resources\Quarter\QuarterCollection;
use App\Http\Controllers\Controller;
use App\Quarter;

class QuarterController extends Controller
{
    public function index()
    {
        $quartes = Quarter::orderBy('orders', 'desc')->get();

        return [
            'message' => 'Quarters List',
            'data' => new QuarterCollection($quartes)
        ];
    }
}
