added lang::has method.
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user