Properties

$macros

$macros : array

The registered custom macros.

Type

array

Tags

None found

$encoding

$encoding : string

Cache application encoding locally to save expensive calls to config::get().

Type

string

Tags

None found

Methods

macro()

macro(string  $name, \Laravel\Closure  $macro) : void

Registers a custom macro.

Parameters

string $name
LaravelClosure $macro

static

Tags

None found

entities()

entities(string  $value) : string

Convert HTML characters to entities.

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

Parameters

string $value

Returns

string

static

Tags

None found

decode()

decode(string  $value) : string

Convert entities to HTML characters.

Parameters

string $value

Returns

string

static

Tags

None found

specialchars()

specialchars(string  $value) : string

Convert HTML special characters.

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

Parameters

string $value

Returns

string

static

Tags

None found

script()

script(string  $url, array  $attributes = array()) : string

Generate a link to a JavaScript file.

// Generate a link to a JavaScript file echo HTML::script('js/jquery.js');

// Generate a link to a JavaScript file and add some attributes
echo HTML::script('js/jquery.js', array('defer'));

Parameters

string $url
array $attributes

Returns

string

static

Tags

None found

style()

style(string  $url, array  $attributes = array()) : string

Generate a link to a CSS file.

If no media type is selected, "all" will be used.

// Generate a link to a CSS file echo HTML::style('css/common.css');

// Generate a link to a CSS file and add some attributes
echo HTML::style('css/common.css', array('media' => 'print'));

Parameters

string $url
array $attributes

Returns

string

static

Tags

None found

span()

span(string  $value, array  $attributes = array()) : string

Generate a HTML span.

Parameters

string $value
array $attributes

Returns

string

static

Tags

None found

link()

link(string  $url, string  $title = null, array  $attributes = array(), boolean  $https = null) : string

Generate a HTML link.

// Generate a link to a location within the application echo HTML::link('user/profile', 'User Profile');

// Generate a link to a location outside of the application
echo HTML::link('http://google.com', 'Google');

Parameters

string $url
string $title
array $attributes
boolean $https

Returns

string

static

Tags

None found

link_to_secure()

link_to_secure(string  $url, string  $title = null, array  $attributes = array()) : string

Generate a HTTPS HTML link.

Parameters

string $url
string $title
array $attributes

Returns

string

static

Tags

None found

link_to_asset()

link_to_asset(string  $url, string  $title = null, array  $attributes = array(), boolean  $https = null) : string

Generate an HTML link to an asset.

The application index page will not be added to asset links.

Parameters

string $url
string $title
array $attributes
boolean $https

Returns

string

static

Tags

None found

link_to_secure_asset()

link_to_secure_asset(string  $url, string  $title = null, array  $attributes = array()) : string

Generate an HTTPS HTML link to an asset.

Parameters

string $url
string $title
array $attributes

Returns

string

static

Tags

None found

link_to_route()

link_to_route(string  $name, string  $title = null, array  $parameters = array(), array  $attributes = array()) : string

Generate an HTML link to a route.

An array of parameters may be specified to fill in URI segment wildcards.

// Generate a link to the "profile" named route echo HTML::link_to_route('profile', 'Profile');

// Generate a link to the "profile" route and add some parameters
echo HTML::link_to_route('profile', 'Profile', array('taylor'));

Parameters

string $name
string $title
array $parameters
array $attributes

Returns

string

static

Tags

None found

link_to_action()

link_to_action(string  $action, string  $title = null, array  $parameters = array(), array  $attributes = array()) : string

Generate an HTML link to a controller action.

An array of parameters may be specified to fill in URI segment wildcards.

// Generate a link to the "home@index" action echo HTML::link_to_action('home@index', 'Home');

// Generate a link to the "user@profile" route and add some parameters
echo HTML::link_to_action('user@profile', 'Profile', array('taylor'));

Parameters

string $action
string $title
array $parameters
array $attributes

Returns

string

static

Tags

None found

link_to_language()

link_to_language(string  $language, string  $title = null, array  $attributes = array()) : string

Generate an HTML link to a different language

Parameters

string $language
string $title
array $attributes

Returns

string

static

Tags

None found

mailto()

mailto(string  $email, string  $title = null, array  $attributes = array()) : string

Generate an HTML mailto link.

The E-Mail address will be obfuscated to protect it from spam bots.

Parameters

string $email
string $title
array $attributes

Returns

string

static

Tags

None found

email()

email(string  $email) : string

Obfuscate an e-mail address to prevent spam-bots from sniffing it.

Parameters

string $email

Returns

string

static

Tags

None found

image()

image(string  $url, string  $alt = '', array  $attributes = array()) : string

Generate an HTML image element.

Parameters

string $url
string $alt
array $attributes

Returns

string

static

Tags

None found

ol()

ol(array  $list, array  $attributes = array()) : string

Generate an ordered list of items.

Parameters

array $list
array $attributes

Returns

string

static

Tags

None found

ul()

ul(array  $list, array  $attributes = array()) : string

Generate an un-ordered list of items.

Parameters

array $list
array $attributes

Returns

string

static

Tags

None found

dl()

dl(array  $list, array  $attributes = array()) : string

Generate a definition list.

Parameters

array $list
array $attributes

Returns

string

static

Tags

None found

attributes()

attributes(array  $attributes) : string

Build a list of HTML attributes from an array.

Parameters

array $attributes

Returns

string

static

Tags

None found

__callStatic()

__callStatic(string  $method, array  $parameters) : mixed

Dynamically handle calls to custom macros.

Parameters

string $method
array $parameters

Returns

mixed

static

Tags

None found

obfuscate()

obfuscate(string  $value) : string

Obfuscate a string to prevent spam-bots from sniffing it.

Parameters

string $value

Returns

string

static

Tags

None found

encoding()

encoding() : string

Get the appliction.encoding without needing to request it from Config::get() each time.

Returns

string

static

Tags

None found

listing()

listing(string  $type, array  $list, array  $attributes = array()) : string

Generate an ordered or un-ordered list.

Parameters

string $type
array $list
array $attributes

Returns

string

static

Tags

None found