added lang::has method.

This commit is contained in:
Taylor Otwell
2012-02-01 10:02:46 -06:00
parent 0c69b2c0c0
commit a9873a479d

View File

@@ -73,6 +73,18 @@ class Lang {
return new static($key, $replacements, $language);
}
/**
* Determine if a language line exists.
*
* @param string $key
* @param string $language
* @return bool
*/
public static function has($key, $language = null)
{
return ! is_null(static::line($key, array(), $language)->get());
}
/**
* Get the language line as a string.
*