Usually, you'd have each post category use a slug
column in the database for the URL fragment, and then use something like:
HTML::link('blog/category/'.$post->category->slug, $post->category->name)
There's appears to be no way with Laravel to automatically encode only certain parts of the URL, so you'd have to do it yourself:
HTML::link(
'admin/blog/category/'.urlencode(strtolower($post->category)),
$post->category
)
You might want to consider using the "slug" approach. You don't necessarily have to store it in the database, you could have your class generate it on the fly:
class Category {
function slug() {
return urlencode(strtolower($this->name));
}
}
I'm not sure what you're working with exactly, but hopefully you get the idea.