Showing 10 of 2,142 results.

Laravel Helper Function: env

env($key, $default = null) The env function can be used to get an environment variables value. If an environment value with the given $key exists, its value will be returned. If the given $key does not exist, the $default value will be returned...

Example Use | Laravel 5: String Translation Public API

For the following examples, we will create a new JSON-based language file at resources/lang/example.json : 1 { 2 " validation.accepted " : " The :attribute is required, resolved from 3 our example JSON file. " 4 } In the following example, we will...

Laravel Collection Public API: whereIn

whereIn($key, array $values, $strict = true) The whereIn method is used to filter the collection based on a given $key and an array of the possible $values that the $key can have. The method also defines an optional $strict parameter, which when...

Creating a Custom Statamic 500 Server Error Page: Part Two

This is a follow up article to the Creating a Custom Statamic 500 Server Error Page article. In the previous article, we created a generic server error page that would display the same information regardless of what type of error was raised within...