<?php
/**
 * @author Patsura Dmitry @ovr <talk@dmtry.me>
 */

/**
 * Class IndexController
 * @Path("/api/")
 */
class IndexController extends \Owl\Rest\Controller
{
    /**
     * @Get
     * @Url("/user/{id:int}/")
     */
    public function indexAction($id)
    {
        return array(
            'user' => array(
                'id' => $id
            )
        );
    }

    /**x
     * @Post
     * @Url("/user")
     */
    public function createAction()
    {
        //Create new user in db

        return true;
    }

    /**
     * @Delete
     * @Url("/user/{id:int}/")
     */
    public function deleteAction()
    {
        //Remove user from db

        return true;
    }
}
<?php
/**
 * @author Patsura Dmitry @ovr <talk@dmtry.me>
 */

/**
 * Class IndexController
 * @Path("/api/")
 */
class IndexController extends \Owl\Rest\Controller
{
    /**
     * @Get
     * @Url("/user/{id:int}/")
     */
    public function indexAction($id)
    {
        return array(
            'user' => array(
                'id' => $id
            )
        );
    }

    /**
     * @Get
     * @Url("/users")
     */
    public function listAction()
    {
        //Get users from db

        return true;
    }

    /**x
     * @Post
     * @Url("/user")
     */
    public function createAction()
    {
        //Create new user in db

        return true;
    }

    /**
     * @Delete
     * @Url("/user/{id:int}/")
     */
    public function deleteAction()
    {
        //Remove user from db

        return true;
    }
}
Write idea for rest app
Write idea for rest app
