printer-manager-admin/app/Http/Controllers/Api/Printer/GetPrinterController.php

20 lines
364 B
PHP
Raw Permalink Normal View History

2023-11-01 21:27:44 +00:00
<?php
namespace App\Http\Controllers\Api\Printer;
use App\Http\Resources\Printer\ListPrinterResource;
use App\Models\Printer;
use App\Http\Responses\ApiResponse;
class GetPrinterController
{
public function __invoke(string $id)
{
$printer = Printer::find($id);
return ApiResponse::handle(ListPrinterResource::make($printer));
}
}