Laravel 5: Encoding HTML With the "e" Helper Function
The e function is a simple wrapper of PHP's htmlentities function. The e function utilizes the UTF-8 character encoding. The e function will sanitize user input when displaying it to the browser.
Showing 10 of 1,090 results.
The e function is a simple wrapper of PHP's htmlentities function. The e function utilizes the UTF-8 character encoding. The e function will sanitize user input when displaying it to the browser.
event($event, $payload = [], $halt = false) The event helper is a convenient way to dispatch a particular $event to its listeners. An optional $payload of data can also be supplied when dispatching the event. When the event is dispatched, all its...
config($key = null, $default = null) The config helper function is a versatile function. If the supplied $key and $default value are both null, such as in the following method call: 1 <?php 2 3 // Calling the `config` function without any...
The ascii helper method accepts only one argument: $value . $value should always be a string, or something that can be cast into a string. The function converts a string in the UTF-8 encoding into its ASCII equivalent. This function is useful when...
The CategoriesFilter add-on is simply a custom Statamic Collection Filter that is really good at figuring out how articles on the site are related to one another based on their category. This is made simpler by the fact that I am limiting each...
where($array, callable $callback) The where helper method is functionally similar to the pluck method, in that both take a source $array and filter it to produce a smaller array. It works by iterating over each element in the $array and executing...
elixir($file, $buildDirectory = 'build') The elixir helper function can be used to get the path to a versioned Elixir file. The function accepts two arguments, the name of the $file to find the path for and the $buildDirectory to look in. By...
By default the metadata manager will add the <meta name="robots" content="noindex, nofollow"> tag to all pages when the site is not running in production mode. This behavior can be changed by modifying guard_index_follow configuration value within...
…basic usage of the replaceLast method. The results of the method call will appear above the call as a comment. 1 use Illuminate \ Support \ Str ; 2 3 // Hello! Goodbye! 4 Str :: replaceLast ( ' Hello ' , ' Goodbye ' , ' Hello! Hello! ' ) ; 5 6 //...
The divide helper method will take the given $array and create two new arrays. The first array will be all of the keys from the original $array and the second array will be all of the values. 1 <?php 2 3 use Illuminate \ Support \ Arr ; 4 5 $...