From a204054ad3ef84d1c656af8be8dd2fc32e7c8dcf Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 16 Jan 2012 16:39:54 -0600 Subject: [PATCH] added profile method to db class. --- laravel/database.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/laravel/database.php b/laravel/database.php index 2595bc9e..ef2389a0 100644 --- a/laravel/database.php +++ b/laravel/database.php @@ -110,6 +110,16 @@ public static function raw($value) return new Expression($value); } + /** + * Get the profiling data for all queries. + * + * @return array + */ + public static function profile() + { + return Database\Connection::$queries; + } + /** * Magic Method for calling methods on the default database connection. *