<?php
/**
 * JSON:API Controller Class
 *
 * @version     1.0.$Revision:$
 * @version     SVN: $Id:$
 * @package     bplan-base/globals
 * @subpackage  ApiControllers
 * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
 * @copyright   Copyright (C) 2025, 2026 bplan-solutions GmbH & Co. KG <https://www.bplan-solutions.de/>
 * /Δ\
 */

namespace BplanBase\Globals\Http\Controllers\Api\Terminal;


use BplanBase\Globals\Helpers\Collection as CollectionHelper;
use BplanBase\Globals\Http\Controllers\Controller;
use BplanBase\Globals\Models\Language;
use LaravelJsonApi\Core\Responses\DataResponse;


/**
 * JSON:API Controller Class
 *
 * @version     1.0.0 / 2025-01-27
 * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
 */
class LanguageController extends Controller
{


/* +++ TRAITS +++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */


/* +++ CLASS CONSTANTS +++ ++++++++++++++++++++++++++++++++++++++++++++++++++ */


/* +++ OBJECT MEMBERS +++ +++++++++++++++++++++++++++++++++++++++++++++++++++ */


/* +++ CLASS MEMBERS +++ ++++++++++++++++++++++++++++++++++++++++++++++++++++ */


/* +++ OBJECT METHODS +++ +++++++++++++++++++++++++++++++++++++++++++++++++++ */


    /**
     * Ermittelt alle Mitarbeiter zu einer ContactGroup
     *
     * @return      DataResponse
     *
     * @version     1.0.0 / 2025-01-27
     * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
     */
    public function index(): DataResponse
    {
        $Collection = Language::where('active', '=', 1)
            ->get();

        return DataResponse::make(CollectionHelper::completeLabels($Collection));

    } // index()


/* +++ CLASS METHODS +++ ++++++++++++++++++++++++++++++++++++++++++++++++++++ */


} // class LanguageController extends Controller {}
