PhalconRest\Api\ApiResource::crud PHP 메소드

crud() 공개 정적인 메소드

Returns resource with default values & all, find, create, update and delete endpoints pre-configured
public static crud ( string $prefix, string $name = null ) : static
$prefix string Prefix for the resource (e.g. /user)
$name string Name for the resource (e.g. users) (optional)
리턴 static
    public static function crud($prefix, $name = null)
    {
        return self::factory($prefix, $name)->endpoint(ApiEndpoint::all())->endpoint(ApiEndpoint::find())->endpoint(ApiEndpoint::create())->endpoint(ApiEndpoint::update())->endpoint(ApiEndpoint::remove());
    }