From e368a25b2412e3a141d879294c66263e81e13b63 Mon Sep 17 00:00:00 2001 From: An Phan Date: Mon, 16 Mar 2015 13:58:16 +0800 Subject: [PATCH] Add auth() helper Add auth() helper --- src/Illuminate/Foundation/helpers.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Illuminate/Foundation/helpers.php b/src/Illuminate/Foundation/helpers.php index 86836cf494bd..268411285701 100644 --- a/src/Illuminate/Foundation/helpers.php +++ b/src/Illuminate/Foundation/helpers.php @@ -84,6 +84,19 @@ function asset($path, $secure = null) } } +if ( ! function_exists('auth')) +{ + /** + * Get the Auth object of the system. + * + * @return \Illuminate\Auth\AuthManager + */ + function auth() + { + return app('auth'); + } +} + if ( ! function_exists('base_path')) { /**