Browse Source

added profile method to db class.

Taylor Otwell 13 years ago
parent
commit
a204054ad3
1 changed files with 10 additions and 0 deletions
  1. 10 0
      laravel/database.php

+ 10 - 0
laravel/database.php

@@ -110,6 +110,16 @@ class Database {
 		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.
 	 *