darkimmortal/Laravel4-SmartyView — pull request #8 by J5lx (2014-01-10 21:37:55+00:00)
Title: Add support for Laravel's URL and link helper functions

I wrote two Smarty plugins for [Laravel's URL and link helper functions](http://laravel.com/docs/helpers#urls), `{url}` for `action()`, `route()`, `asset()` and `url()` and `{link_to}` for `link_to()`, `link_to_asset()`, `link_to_route()` and `link_to_action()`.

##### Usage Examples

In all cases the `assign` parameter can be used to assign the return value to a given template variable instead of outputting it.

###### {url}

{* for url() *}
{url url="…" some_param="…"}

{* for url() (secure) *}
{url url="…" some_param="…" secure=true}

{* for asset() *}
{url asset="…"}

{* for asset() (secure) *}
{url asset="…" secure=true}

{* for route() and action() *}
{url route="…" some_param="…"}
{url action="…" some_param="…"}

###### {link_to}

{* for link_to() and link_to_asset() *}
{link_to url="…" _title="Title Attribute" some_param="…"}
{link_to asset="…" _title="Title Attribute" some_param="…"}

{* for link_to() and link_to_asset() (secure) *}
{link_to url="…" _title="Title Attribute" some_param="…" secure=true}
{link_to asset="…" _title="Title Attribute" some_param="…" secure=true}

{* for link_to_route() and link_to_action() *}
{link_to route="…" _title="Title Attribute" param_some_param="…" attrib_some_attribute="…"}
{link_to action="…" _title="Title Attribute" param_some_param="…" attrib_some_attribute="…"}