exchange/app/Http/Controllers/Api/VideoController.php

16 lines
321 B
PHP
Raw Normal View History

2022-12-07 06:04:13 +00:00
<?php
namespace App\Http\Controllers\Api;
use App\Models\Video;
use App\Transformers\VideoTransformer;
class VideoController extends ApiController
{
public function index()
{
$video = Video::latest()->first();
return $this->respondWithItem($video, new VideoTransformer($this->locale));
2022-12-07 06:04:13 +00:00
}
}