From 97ac2c8dbff026895b0cc8f5479dc52e96465bd1 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 1 Apr 2012 15:17:41 -0500 Subject: [PATCH] added languages method to the request class. --- laravel/request.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/laravel/request.php b/laravel/request.php index 6ed7fe13..07b9bb72 100644 --- a/laravel/request.php +++ b/laravel/request.php @@ -125,6 +125,16 @@ public static function accepts($type) return in_array($type, static::accept()); } + /** + * Get the languages accepted by the client's browser. + * + * @return array + */ + public static function languages() + { + return static::foundation()->getLanguages(); + } + /** * Determine if the current request is using HTTPS. *