I have added
app_path().'/classes',
to global.php in the ClassLoader::addDirectories array. In app/classes/helpers/Url.php I have:
<?php namespace Helpers;
class Url {
public static function prep($str)
{
if ($str == 'http://' OR $str == '')
{
return '';
}
$url = parse_url($str);
if ( ! $url OR ! isset($url['scheme']))
{
$str = 'http://'.$str;
}
return $str;
}
}
Then in a view I have:
{{HTML::link(Helpers\URL::prep($place->url), $place->url, array('target' => '_blank'))}}
This works fine locally, but on my server I'm getting an error for: Class 'Helpers\URL' not found. I tried going through these steps, but it didn't work either. Any ideas?