Recipe functions: server and client — part 1
Generated from brezel/api@ddd04f543e0fecc433a351dcaab24d39087b24be — do not edit by hand.
Recipe functions availability and signatures
Section titled “Recipe functions availability and signatures”Server: brezel/api@ddd04f543e0fecc433a351dcaab24d39087b24be. Client: brezel/spa@77a559b9de80779ffbb86195d595b599247acdf3; @kibro/brezel-recipes 2.5.0. Signatures describe registered callables; variadic forwarding can accept additional arguments. Wrapper methods and application extensions are outside this table. Client math functions use mathjs. Availability does not imply identical behavior.
| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
abs | yes | yes | Server: abs(int|float num); Client: abs(x) | Absolute value. |
anonymize
Section titled “anonymize”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
anonymize | yes | no | Server: anonymize(entity) | Removes entity identifiers for anonymous copies. |
array_chunk
Section titled “array_chunk”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
array_chunk | yes | no | Server: array_chunk(...args) | Splits an array into chunks. |
array_count_values
Section titled “array_count_values”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
array_count_values | yes | no | Server: array_count_values(...args) | Counts occurrences of array values. |
array_flip
Section titled “array_flip”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
array_flip | yes | no | Server: array_flip(...args) | Exchanges array keys and values. |
array_reverse
Section titled “array_reverse”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
array_reverse | yes | no | Server: array_reverse(...args) | Reverses array order. |
array_slice
Section titled “array_slice”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
array_slice | yes | no | Server: array_slice(...args) | Extracts a slice of an array. |
array_unique
Section titled “array_unique”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
array_unique | yes | no | Server: array_unique(...args) | Removes duplicate array values. |
| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
avg | yes | yes | Server: avg(x); Client: avg(x) | Arithmetic mean of values. |
| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
can | yes | yes | Server: can(string ability, App\Resources\Entity|App\Modules\Module|null thing); Client: can(module: string, action: ModuleOperation = 'READ') | Checks permission; server and client use different arguments. |
capitalize
Section titled “capitalize”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
capitalize | yes | no | Server: capitalize(value) | Uppercases the first character. |
| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
ceil | yes | yes | Server: ceil(int|float num); Client: ceil(x) | Rounds upward. |
client
Section titled “client”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
client | yes | yes | Server: client(); Client: client(hydrated: boolean) | Returns the current client; client-side hydration is optional. |
collect
Section titled “collect”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
collect | yes | no | Server: collect(value = []) | Wraps values in a Laravel collection. |
concat
Section titled “concat”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
concat | yes | no | Server: concat(...args) | Concatenates values. |
contains
Section titled “contains”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
contains | yes | no | Server: contains(...args) | Checks whether a value contains another value. |
| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
cos | yes | yes | Server: cos(float num); Client: cos(x) | Cosine. |
countries
Section titled “countries”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
countries | yes | no | Server: countries(bool longList = false, bool hydrate = false) | Lists countries. |
country
Section titled “country”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
country | yes | no | Server: country(...input) | Wraps a country code. |
currencies
Section titled “currencies”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
currencies | yes | no | Server: currencies() | Lists currencies. |
| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
date | yes | yes | Server: date(...input); Client: date(x) | Creates a date wrapper. |
decodeBase64
Section titled “decodeBase64”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
decodeBase64 | yes | no | Server: decodeBase64(data) | Decodes Base64 data. |
duration
Section titled “duration”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
duration | yes | yes | Server: duration(...input); Client: duration(x) | Creates a duration wrapper. |
| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
empty | yes | no | Server: empty(arg) | Checks PHP emptiness. |
encodeBase64
Section titled “encodeBase64”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
encodeBase64 | yes | no | Server: encodeBase64(data) | Encodes data as Base64. |
endsWith
Section titled “endsWith”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
endsWith | yes | no | Server: endsWith(...args) | Checks a string suffix. |
entity
Section titled “entity”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
entity | yes | no | Server: entity(array array, ?bool exists = true, module_id = null) | Creates an entity from an array. |
| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
env | yes | yes | Server: env(string key, default = null, bool include_system_env = false); Client: env(key: string) | Reads environment configuration; client exposes VITE variables. |
| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
eval | yes | no | Server: eval(recipe, data = [], vars = []) | Evaluates a recipe with data and variables. |
| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
exp | yes | no | Server: exp(float num) | Exponential function. |
| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
float | yes | no | Server: float(value) | Converts to a floating-point number. |
floatval
Section titled “floatval”| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
floatval | yes | no | Server: floatval(...args) | Converts to a floating-point number using PHP floatval. |
| Function | Server | Client | Signature | Short description |
|---|---|---|---|---|
floor | yes | yes | Server: floor(int|float num); Client: floor(x) | Rounds downward. |