added lang::has method.

This commit is contained in:
Taylor Otwell 2012-02-01 10:02:46 -06:00
parent 0c69b2c0c0
commit a9873a479d
1 changed files with 12 additions and 0 deletions

View File

@ -73,6 +73,18 @@ public static function line($key, $replacements = array(), $language = null)
return new static($key, $replacements, $language); 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. * Get the language line as a string.
* *