Constants

BLADE_EXT

BLADE_EXT

File

Tags

package

Default

CRLF

CRLF

File

Tags

package

Default

DEFAULT_BUNDLE

DEFAULT_BUNDLE

File

Tags

package

Default

DS

DS

File

Tags

package

Default

DS

DS

File

Tags

package

Default

EXT

EXT

File

Tags

package

Default

MB_STRING

MB_STRING

File

Tags

package

Default

Functions

__()

__(string  $key, array  $replacements = array(), string  $language = null) : string

Retrieve a language line.

Parameters

string $key
array $replacements
string $language

Returns

string

File

Tags

package

Default

action()

action(string  $action, array  $parameters = array()) : string

Generate a URL to a controller action.

// Generate a URL to the "index" method of the "user" controller $url = action('user@index');

// Generate a URL to http://example.com/user/profile/taylor
$url = action('user@profile', array('taylor'));

Parameters

string $action
array $parameters

Returns

string

File

Tags

package

Default

array_divide()

array_divide(array  $array) : array

Divide an array into two arrays. One with keys and the other with values.

Parameters

array $array

Returns

array

File

Tags

package

Default

array_except()

array_except(array  $array, array  $keys) : array

Get all of the given array except for a specified array of items.

Parameters

array $array
array $keys

Returns

array

File

Tags

package

Default

array_first()

array_first(array  $array, \Closure  $callback, mixed  $default = null) : mixed

Return the first element in an array which passes a given truth test.

// Return the first array element that equals "Taylor" $value = array_first($array, function($k, $v) {return $v == 'Taylor';});

// Return a default value if no matching element is found
$value = array_first($array, function($k, $v) {return $v == 'Taylor'}, 'Default');

Parameters

array $array
Closure $callback
mixed $default

Returns

mixed

File

Tags

package

Default

array_forget()

array_forget(array  $array, string  $key) : void

Remove an array item from a given array using "dot" notation.

// Remove the $array['user']['name'] item from the array array_forget($array, 'user.name');

// Remove the $array['user']['name']['first'] item from the array
array_forget($array, 'user.name.first');

Parameters

array $array
string $key

File

Tags

package

Default

array_get()

array_get(array  $array, string  $key, mixed  $default = null) : mixed

Get an item from an array using "dot" notation.

// Get the $array['user']['name'] value from the array $name = array_get($array, 'user.name');

// Return a default from if the specified item doesn't exist
$name = array_get($array, 'user.name', 'Taylor');

Parameters

array $array
string $key
mixed $default

Returns

mixed

File

Tags

package

Default

array_only()

array_only(array  $array, array  $keys) : array

Get a subset of the items from the given array.

Parameters

array $array
array $keys

Returns

array

File

Tags

package

Default

array_pluck()

array_pluck(array  $array, string  $key) : array

Pluck an array of values from an array.

Parameters

array $array
string $key

Returns

array

File

Tags

package

Default

array_set()

array_set(array  $array, string  $key, mixed  $value) : void

Set an array item to a given value using "dot" notation.

If no key is given to the method, the entire array will be replaced.

// Set the $array['user']['name'] value on the array array_set($array, 'user.name', 'Taylor');

// Set the $array['user']['name']['first'] value on the array
array_set($array, 'user.name.first', 'Michael');

Parameters

array $array
string $key
mixed $value

File

Tags

package

Default

array_strip_slashes()

array_strip_slashes(array  $array) : array

Recursively remove slashes from array keys and values.

Parameters

array $array

Returns

array

File

Tags

package

Default

asset()

asset(string  $url, boolean  $https = null) : string

Generate an application URL to an asset.

Parameters

string $url
boolean $https

Returns

string

File

Tags

package

Default

class_basename()

class_basename(object|string  $class) : string

Get the "class basename" of a class or object.

The basename is considered to be the name of the class minus all namespaces.

Parameters

object|string $class

Returns

string

File

Tags

package

Default

dd()

dd(mixed  $value) : void

Dump the given value and kill the script.

Parameters

mixed $value

File

Tags

package

Default

e()

e(string  $value) : string

Convert HTML characters to entities.

The encoding specified in the application configuration file will be used.

Parameters

string $value

Returns

string

File

Tags

package

Default

eloquent_to_json()

eloquent_to_json(\Eloquent|array  $models) : object

Transform Eloquent models to a JSON object.

Parameters

Eloquent|array $models

Returns

object

File

Tags

package

Default

ends_with()

ends_with(string  $haystack, string  $needle) : boolean

Determine if a given string ends with a given value.

Parameters

string $haystack
string $needle

Returns

boolean

File

Tags

package

Default

get_cli_option()

get_cli_option(string  $option, mixed  $default = null) : string

Get a CLI option from the argv $_SERVER variable.

Parameters

string $option
mixed $default

Returns

string

File

Tags

package

Default

get_file_size()

get_file_size(integer  $size) : string

Calculate the human-readable file size (with proper units).

Parameters

integer $size

Returns

string

File

Tags

package

Default

has_php()

has_php(string  $version) : boolean

Determine if the current version of PHP is at least the supplied version.

Parameters

string $version

Returns

boolean

File

Tags

package

Default

head()

head(array  $array) : mixed

Return the first element of an array.

This is simply a convenient wrapper around the "reset" method.

Parameters

array $array

Returns

mixed

File

Tags

package

Default

magic_quotes()

magic_quotes() : boolean

Determine if "Magic Quotes" are enabled on the server.

Returns

boolean

File

Tags

package

Default

render()

render(string  $view, array  $data = array()) : string

Render the given view.

Parameters

string $view
array $data

Returns

string

File

Tags

package

Default

render_each()

render_each(string  $partial, array  $data, string  $iterator, string  $empty = 'raw|') : string

Get the rendered contents of a partial from a loop.

Parameters

string $partial
array $data
string $iterator
string $empty

Returns

string

File

Tags

package

Default

root_namespace()

root_namespace(string  $class, string  $separator = '\\') : string

Get the root namespace of a given class.

Parameters

string $class
string $separator

Returns

string

File

Tags

package

Default

route()

route(string  $name, array  $parameters = array()) : string

Generate a URL from a route name.

// Create a URL to the "profile" named route $url = route('profile');

// Create a URL to the "profile" named route with wildcard parameters
$url = route('profile', array($username));

Parameters

string $name
array $parameters

Returns

string

File

Tags

package

Default

starts_with()

starts_with(string  $haystack, string  $needle) : boolean

Determine if a given string begins with a given value.

Parameters

string $haystack
string $needle

Returns

boolean

File

Tags

package

Default

str_contains()

str_contains(string  $haystack, string|array  $needle) : boolean

Determine if a given string contains a given sub-string.

Parameters

string $haystack
string|array $needle

Returns

boolean

File

Tags

package

Default

str_finish()

str_finish(string  $value, string  $cap) : string

Cap a string with a single instance of the given string.

Parameters

string $value
string $cap

Returns

string

File

Tags

package

Default

str_object()

str_object(object  $value) : boolean

Determine if the given object has a toString method.

Parameters

object $value

Returns

boolean

File

Tags

package

Default

url()

url(string  $url = '', boolean  $https = null) : string

Generate an application URL.

// Create a URL to a location within the application $url = url('user/profile');

// Create a HTTPS URL to a location within the application
$url = url('user/profile', true);

Parameters

string $url
boolean $https

Returns

string

File

Tags

package

Default

value()

value(mixed  $value) : mixed

Return the value of the given item.

If the given item is a Closure the result of the Closure will be returned.

Parameters

mixed $value

Returns

mixed

File

Tags

package

Default

view()

view(string  $view, array  $data = array()) : \View

Get a view instance.

Parameters

string $view
array $data

Returns

View

File

Tags

package

Default

with()

with(mixed  $object) : mixed

Short-cut for constructor method chaining.

Parameters

mixed $object

Returns

mixed

File

Tags

package

Default

yielder()

yielder(string  $section) : string

Get the string contents of a section.

Parameters

string $section

Returns

string

File

Tags

package

Default