@@ -137,10 +137,12 @@ public static function span($value, $attributes = array())
137
137
* @param bool $https
138
138
* @return string
139
139
*/
140
- public static function link ($ url , $ title , $ attributes = array (), $ https = null )
140
+ public static function link ($ url , $ title = null , $ attributes = array (), $ https = null )
141
141
{
142
142
$ url = URL ::to ($ url , $ https );
143
143
144
+ if (is_null ($ title )) $ title = $ url ;
145
+
144
146
return '<a href=" ' .$ url .'" ' .static ::attributes ($ attributes ).'> ' .static ::entities ($ title ).'</a> ' ;
145
147
}
146
148
@@ -152,7 +154,7 @@ public static function link($url, $title, $attributes = array(), $https = null)
152
154
* @param array $attributes
153
155
* @return string
154
156
*/
155
- public static function link_to_secure ($ url , $ title , $ attributes = array ())
157
+ public static function link_to_secure ($ url , $ title = null , $ attributes = array ())
156
158
{
157
159
return static ::link ($ url , $ title , $ attributes , true );
158
160
}
@@ -168,7 +170,7 @@ public static function link_to_secure($url, $title, $attributes = array())
168
170
* @param bool $https
169
171
* @return string
170
172
*/
171
- public static function link_to_asset ($ url , $ title , $ attributes = array (), $ https = null )
173
+ public static function link_to_asset ($ url , $ title = null , $ attributes = array (), $ https = null )
172
174
{
173
175
$ url = URL ::to_asset ($ url , $ https );
174
176
@@ -183,7 +185,7 @@ public static function link_to_asset($url, $title, $attributes = array(), $https
183
185
* @param array $attributes
184
186
* @return string
185
187
*/
186
- public static function link_to_secure_asset ($ url , $ title , $ attributes = array ())
188
+ public static function link_to_secure_asset ($ url , $ title = null , $ attributes = array ())
187
189
{
188
190
return static ::link_to_asset ($ url , $ title , $ attributes , true );
189
191
}
@@ -207,7 +209,7 @@ public static function link_to_secure_asset($url, $title, $attributes = array())
207
209
* @param array $attributes
208
210
* @return string
209
211
*/
210
- public static function link_to_route ($ name , $ title , $ parameters = array (), $ attributes = array ())
212
+ public static function link_to_route ($ name , $ title = null , $ parameters = array (), $ attributes = array ())
211
213
{
212
214
return static ::link (URL ::to_route ($ name , $ parameters ), $ title , $ attributes );
213
215
}
@@ -231,7 +233,7 @@ public static function link_to_route($name, $title, $parameters = array(), $attr
231
233
* @param array $attributes
232
234
* @return string
233
235
*/
234
- public static function link_to_action ($ action , $ title , $ parameters = array (), $ attributes = array ())
236
+ public static function link_to_action ($ action , $ title = null , $ parameters = array (), $ attributes = array ())
235
237
{
236
238
return static ::link (URL ::to_action ($ action , $ parameters ), $ title , $ attributes );
237
239
}
@@ -418,7 +420,7 @@ public static function __callStatic($method, $parameters)
418
420
{
419
421
return call_user_func_array (static ::$ macros [$ method ], $ parameters );
420
422
}
421
-
423
+
422
424
throw new \Exception ("Method [ $ method] does not exist. " );
423
425
}
424
426
0 commit comments