Global Helpers
Global Helpers
capitalize()— Capitalizes all words in the text to create a nicer looking title.controller()— Creates and returns a controller object with your own custom name and params.deobfuscateParam()— Deobfuscates a value.distanceOfTimeInWords()— Pass in two dates to this method, and it will return a string describing the difference between them.excerpt()— Extracts an excerpt from text that matches the first instance of a given phrase.humanize()— Returns readable text by capitalizing and converting camel casing to multiple words.hyphenize()— Converts camelCase strings to lowercase strings with hyphens as word delimiters instead. Example: myVariable becomes my-mimeTypes()— Returns an associated MIME type based on a file extension.model()— Returns a reference to the requested model so that class level methods can be called on it.obfuscateParam()— Obfuscates a value. Typically used for hiding primary key values when passed along in the URL.pluginNames()— Returns a list of the names of all installed plugins.pluralize()— Returns the plural form of the passed in word. Can also pluralize a word based on a value passed to thecount</codsingularize()— Returns the singular form of the passed in word.timeAgoInWords()— Returns a string describing the approximate time difference between the date passed in and the current date.timeUntilInWords()— Returns a string describing the approximate time difference between the current date and the date passed in.titleize()— Capitalizes all words in the text to create a nicer looking title.truncate()— Truncates text to the specified length and replaces the last characters with the specified truncate string (which defaulURLFor()— Creates an internal URL based on supplied arguments.wordTruncate()— Truncates text to the specified length of words and replaces the remaining characters with the specified truncate string