18 lines
468 B
PHP
18 lines
468 B
PHP
<?php
|
|
|
|
namespace App\Modules\Movies\Http\Controllers\Browse;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Modules\Movies\Services\Contracts\ShowMovieServiceInterface;
|
|
use Illuminate\Http\JsonResponse;
|
|
|
|
class MovieShowController extends Controller
|
|
{
|
|
public function __invoke(string $movie, ShowMovieServiceInterface $service): JsonResponse
|
|
{
|
|
$id = (int) $movie;
|
|
$model = $service->getById($id);
|
|
return response()->json($model);
|
|
}
|
|
}
|