<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
josepostiga / docker-registry-api-explorer example snippets
class RepositoriesController
{
public function index(DockerRegistryCatalogRepository $repository)
{
return $repository->list();
}
}
class TagsController
{
public function index(string $image)
{
// the $image variable is a route placeholder, automatically injected by Laravel as a controller method param.
$repository = App::makeWith(DockerRegistryTagsRepository::class, [
'image' => $image
]);
return $repository->list();
}
}
class ManifestController
{
public function index(string $image, string $tag)
{
// the $image and $tag variables are route placeholders, automatically injected by Laravel as controller method params.
$manifest = App::makeWith(DockerRegistryManifestRepository::class, [
'image' => $image,
'tag' => $tag,
]);
return $manifest->get();
}
}
bash
php artisan vendor:publish --tag=config
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.