We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f6e234 commit adf0795Copy full SHA for adf0795
src/laravel.php
@@ -0,0 +1,26 @@
1
+<?php
2
+
3
+use Illuminate\Support\Facades\DB;
4
5
+if (!function_exists('laravel_db_is_mysql')) {
6
+ function laravel_db_is_mysql()
7
+ {
8
+ return (DB::getDefaultConnection() == 'mysql');
9
+ }
10
+}
11
12
+if (!function_exists('laravel_db_mysql_now')) {
13
+ function laravel_db_mysql_now()
14
15
+ $result = (array) DB::selectOne('select now() as now');
16
+ return $result['now'];
17
18
19
20
+if (!function_exists('laravel_db_mysql_variable')) {
21
+ function laravel_db_mysql_variable($name)
22
23
+ $result = (array) DB::selectOne('show variables where variable_name = ?', [$name]);
24
+ return (isset($result['Value']) ? $result['Value'] : false);
25
26
0 commit comments