refactor messages class.
This commit is contained in:
@@ -70,10 +70,7 @@ class Messages {
|
|||||||
*/
|
*/
|
||||||
public function get($key = null, $format = ':message')
|
public function get($key = null, $format = ':message')
|
||||||
{
|
{
|
||||||
if (is_null($key))
|
if (is_null($key)) return $this->all($format);
|
||||||
{
|
|
||||||
return $this->all($format);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (array_key_exists($key, $this->messages)) ? $this->format($this->messages[$key], $format) : array();
|
return (array_key_exists($key, $this->messages)) ? $this->format($this->messages[$key], $format) : array();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user