Completed
Push — master ( 5cf29f...fed6d2 )
by ARCANEDEV
07:29
created

helpers.php ➔ link_to()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 4
dl 0
loc 4
rs 10
1
<?php
2
3
/* ------------------------------------------------------------------------------------------------
4
 |  Link Helpers
5
 | ------------------------------------------------------------------------------------------------
6
 */
7
if ( ! function_exists('link_to')) {
8
    /**
9
     * Generate a HTML link.
10
     *
11
     * @param  string  $url
12
     * @param  string  $title
13
     * @param  array   $attributes
14
     * @param  bool    $secure
15
     *
16
     * @return string
17
     */
18
    function link_to($url, $title = null, $attributes = array(), $secure = null)
19
    {
20
        return app('html')->link($url, $title, $attributes, $secure);
21
    }
22
}
23
24
if ( ! function_exists('link_to_asset')) {
25
    /**
26
     * Generate a HTML link to an asset.
27
     *
28
     * @param  string  $url
29
     * @param  string  $title
30
     * @param  array   $attributes
31
     * @param  bool    $secure
32
     *
33
     * @return string
34
     */
35
    function link_to_asset($url, $title = null, $attributes = array(), $secure = null)
36
    {
37
        return app('html')->linkAsset($url, $title, $attributes, $secure);
38
    }
39
}
40
41
if ( ! function_exists('link_to_route')) {
42
    /**
43
     * Generate a HTML link to a named route.
44
     *
45
     * @param  string  $name
46
     * @param  string  $title
47
     * @param  array   $parameters
48
     * @param  array   $attributes
49
     *
50
     * @return string
51
     */
52
    function link_to_route($name, $title = null, $parameters = array(), $attributes = array())
53
    {
54
        return app('html')->linkRoute($name, $title, $parameters, $attributes);
55
    }
56
}
57
58
if ( ! function_exists('link_to_action')) {
59
    /**
60
     * Generate a HTML link to a controller action.
61
     *
62
     * @param  string  $action
63
     * @param  string  $title
64
     * @param  array   $parameters
65
     * @param  array   $attributes
66
     *
67
     * @return string
68
     */
69
    function link_to_action($action, $title = null, $parameters = array(), $attributes = array())
70
    {
71
        return app('html')->linkAction($action, $title, $parameters, $attributes);
72
    }
73
}
74