File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -364,7 +364,7 @@ public static function all($columns = array('*')) {
364
364
365
365
return $ instance ->newQuery ()
366
366
->orderBy ($ instance ->getQualifiedOrderColumnName ())
367
- ->get ();
367
+ ->get ($ columns );
368
368
}
369
369
370
370
/**
Original file line number Diff line number Diff line change @@ -9,6 +9,13 @@ public function testAllStatic() {
9
9
$ this ->assertEquals ($ results , $ expected );
10
10
}
11
11
12
+ public function testAllStaticSomeColumns () {
13
+ $ results = Category::all (['id ' ,'name ' ])->toArray ();
14
+ $ expected = Category::query ()->select (['id ' , 'name ' ])->orderBy ('lft ' )->get ()->toArray ();
15
+
16
+ $ this ->assertEquals ($ results , $ expected );
17
+ }
18
+
12
19
public function testAllStaticWithCustomOrder () {
13
20
$ results = OrderedCategory::all ();
14
21
$ expected = OrderedCategory::query ()->orderBy ('name ' )->get ();
You can’t perform that action at this time.
0 commit comments