Skip to content

Commit

Permalink
chore: update controller
Browse files Browse the repository at this point in the history
  • Loading branch information
doyouhaobaby committed Nov 29, 2020
1 parent ed8a869 commit c84c32a
Show file tree
Hide file tree
Showing 18 changed files with 227 additions and 1,456 deletions.
31 changes: 0 additions & 31 deletions application/app/App/Controller/Admin/Show.php

This file was deleted.

39 changes: 39 additions & 0 deletions application/app/App/Controller/Api/Api.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

declare(strict_types=1);

/*
* This file is part of the your app package.
*
* The PHP Application For Code Poem For You.
* (c) 2018-2099 http://yourdomian.com All rights reserved.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace App\App\Controller\Api;

/**
* @codeCoverageIgnore
*/
class Api
{
#[Route(
path: "/api/v1/petLeevelForApi/{petId:[A-Za-z]+}/",
attributes: ["args1" => "hello", "args2" => "world"],
)]
public function petLeevelForApi(string $petId): string
{
return sprintf('Hi you,i am petLeevelForApi and it petId is %s', $petId);
}

#[Route(
path: "/api/v2/withBind/{petId:[A-Za-z]+}/",
middlewares: "api",
)]
public function withBind(string $petId): string
{
return sprintf('Hi you,i am withBind and it petId is %s', $petId);
}
}
37 changes: 37 additions & 0 deletions application/app/App/Controller/Api/Web.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

declare(strict_types=1);

/*
* This file is part of the your app package.
*
* The PHP Application For Code Poem For You.
* (c) 2018-2099 http://yourdomian.com All rights reserved.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace App\App\Controller\Api;

/**
* @codeCoverageIgnore
*/
class Web
{
#[Route(
path: "/web/v1/petLeevelForWeb/{petId:[A-Za-z]+}/",
)]
public function petLeevelForWeb(string $petId): string
{
return 'petLeevelForWeb '. $petId;
}

#[Route(
path: "/web/v2/petLeevelV2Web/",
)]
public function petLeevelV2ForWeb(): string
{
return 'petLeevelV2ForWeb';
}
}
114 changes: 0 additions & 114 deletions application/app/App/Controller/Petstore/Api.php

This file was deleted.

0 comments on commit c84c32a

Please sign in to comment.