File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/Illuminate/Database/Console Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 7
7
use Doctrine \DBAL \Schema \Index ;
8
8
use Doctrine \DBAL \Types \DecimalType ;
9
9
use Illuminate \Contracts \Container \BindingResolutionException ;
10
+ use Illuminate \Database \Eloquent \Model ;
10
11
use Illuminate \Database \Eloquent \Relations \Relation ;
11
12
use Illuminate \Support \Facades \Gate ;
12
13
use Illuminate \Support \Str ;
@@ -158,7 +159,7 @@ protected function getVirtualAttributes($model, $columns)
158
159
->reject (
159
160
fn (ReflectionMethod $ method ) => $ method ->isStatic ()
160
161
|| $ method ->isAbstract ()
161
- || $ method ->getDeclaringClass ()->getName () !== get_class ( $ model )
162
+ || $ method ->getDeclaringClass ()->getName () === Model::class
162
163
)
163
164
->mapWithKeys (function (ReflectionMethod $ method ) use ($ model ) {
164
165
if (preg_match ('/^get(.+)Attribute$/ ' , $ method ->getName (), $ matches ) === 1 ) {
@@ -198,7 +199,7 @@ protected function getRelations($model)
198
199
->reject (
199
200
fn (ReflectionMethod $ method ) => $ method ->isStatic ()
200
201
|| $ method ->isAbstract ()
201
- || $ method ->getDeclaringClass ()->getName () !== get_class ( $ model )
202
+ || $ method ->getDeclaringClass ()->getName () === Model::class
202
203
)
203
204
->filter (function (ReflectionMethod $ method ) {
204
205
$ file = new SplFileObject ($ method ->getFileName ());
You can’t perform that action at this time.
0 commit comments