forked from illuminate/html
-
Notifications
You must be signed in to change notification settings - Fork 0
/
helpers.php
69 lines (65 loc) · 1.72 KB
/
helpers.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
if ( ! function_exists('link_to'))
{
/**
* Generate a HTML link.
*
* @param string $url
* @param string $title
* @param array $attributes
* @param bool $secure
* @return string
*/
function link_to($url, $title = null, $attributes = array(), $secure = null)
{
return app('html')->link($url, $title, $attributes, $secure);
}
}
if ( ! function_exists('link_to_asset'))
{
/**
* Generate a HTML link to an asset.
*
* @param string $url
* @param string $title
* @param array $attributes
* @param bool $secure
* @return string
*/
function link_to_asset($url, $title = null, $attributes = array(), $secure = null)
{
return app('html')->linkAsset($url, $title, $attributes, $secure);
}
}
if ( ! function_exists('link_to_route'))
{
/**
* Generate a HTML link to a named route.
*
* @param string $name
* @param string $title
* @param array $parameters
* @param array $attributes
* @return string
*/
function link_to_route($name, $title = null, $parameters = array(), $attributes = array())
{
return app('html')->linkRoute($name, $title, $parameters, $attributes);
}
}
if ( ! function_exists('link_to_action'))
{
/**
* Generate a HTML link to a controller action.
*
* @param string $action
* @param string $title
* @param array $parameters
* @param array $attributes
* @return string
*/
function link_to_action($action, $title = null, $parameters = array(), $attributes = array())
{
return app('html')->linkAction($action, $title, $parameters, $attributes);
}
}