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


use BplanBase\Globals\Http\Controllers\Api\Terminal\LanguageController;
use LaravelJsonApi\Laravel\Facades\JsonApiRoute;
use LaravelJsonApi\Laravel\Routing\ResourceRegistrar;

JsonApiRoute::server('terminal')
    ->prefix('terminal')
    ->middleware('api')
    ->middleware('auth:sanctum')
    ->withoutMiddleware(\Illuminate\Routing\Middleware\SubstituteBindings::class)
    ->resources(function (ResourceRegistrar $Server) {

        /*
        **  Individuelle index-Route, die dafür sorgt, dass die Labels in allen Terminal-Sprachen verfügbar sind. */
        $Server->resource('languages', LanguageController::class)->only('index');

    });
