PhalconRest\Api\ApiResource::crud PHP Method

crud() public static method

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)
return 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());
    }