File tree 2 files changed +8
-5
lines changed
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 7
7
8
8
class QueryViewerServiceProvider extends \Illuminate \Support \ServiceProvider
9
9
{
10
- const CONFIG_PATH = __DIR__ . '/../config/query-viewer.php ' ;
10
+ const CONFIG_PATH = __DIR__ . '/../config/query-viewer.php ' ;
11
11
12
12
public function boot ()
13
13
{
@@ -25,7 +25,7 @@ public function register()
25
25
26
26
$ queryBuilderMixin = new QueryBuilderMixin ();
27
27
28
- // TODO: use mixin method for laravel 7 and 8 .
28
+ // TODO: use mixin for laravel version >= 7 .
29
29
foreach (get_class_methods ($ queryBuilderMixin ) as $ method ) {
30
30
EloquentQueryBuilder::macro ($ method , $ queryBuilderMixin ->{$ method }());
31
31
QueryBuilder::macro ($ method , $ queryBuilderMixin ->{$ method }());
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public function testGetSqlMethodExistsOnEloquentBuilder()
24
24
{
25
25
$ this ->assertEquals (
26
26
'select `name` from `test_table` where `id` = 5 ' ,
27
- EloquentBuilderTest ::select ('name ' )->where ('id ' , 5 )->getSql ()
27
+ EloquentBuilderTestModel ::select ('name ' )->where ('id ' , 5 )->getSql ()
28
28
);
29
29
}
30
30
@@ -37,6 +37,9 @@ public function testGetSqlMethodExistsOnDatabaseBuilder()
37
37
}
38
38
}
39
39
40
- class EloquentBuilderTest extends \Illuminate \Database \Eloquent \Model {
40
+ class EloquentBuilderTestModel extends \Illuminate \Database \Eloquent \Model
41
+ {
41
42
protected $ table = 'test_table ' ;
42
- };
43
+ }
44
+
45
+ ;
You can’t perform that action at this time.
0 commit comments