File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 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('*')) {
364364
365365 return $ instance ->newQuery ()
366366 ->orderBy ($ instance ->getQualifiedOrderColumnName ())
367- ->get ();
367+ ->get ($ columns );
368368 }
369369
370370 /**
Original file line number Diff line number Diff line change @@ -9,6 +9,13 @@ public function testAllStatic() {
99 $ this ->assertEquals ($ results , $ expected );
1010 }
1111
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+
1219 public function testAllStaticWithCustomOrder () {
1320 $ results = OrderedCategory::all ();
1421 $ expected = OrderedCategory::query ()->orderBy ('name ' )->get ();
You can’t perform that action at this time.
0 commit comments