fahlgrendigital / tools-for-statamic
Various tools commonly used in our Statamic projects.
Installs: 119
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 0
Open Issues: 0
pkg:composer/fahlgrendigital/tools-for-statamic
Requires
- php: ^8.2
- statamic/cms: ^5.0
README
Various tools commonly used in our Statamic projects.
Modifiers
MakeResource
Converts entries or terms to an api resource. Can be a query or collection.
{{ collection | make_resource | to_json | sanitize }} {{ query | make_resource | to_json | sanitize }}
ApiRouteList
Converts entries or terms to an array of api routes. Can be a query or collection.
{{ collection | api_route_list | to_json | sanitize }} {{ query | api_route_list | to_json | sanitize }}
Tags
RandomString
Creates a random string using the Str::random($length)
Laravel function. Default length is 20.
{{ random_string }} {{ random_string length="10" }}