public static function all()
    {
        $command = 'grep --include="*.php" --files-with-matches -r "class" '.app_path();

        exec($command, $files);

        return collect($files)->map(function($file) {
            return self::convertFileToClass($file);
        })->filter(function($class) {
            return class_exists($class) && is_subclass_of($class, Model::class);
        });
    }
public static function all()
    {
        $command = 'grep --include="*.php" --files-with-matches -r "class" '.app_path();

        exec($command, $files);

        return collect($files)->map(function($file) {
            return self::convertFileToClass($file);
        })->filter(function($class) {
            return class_exists($class) && is_subclass_of($class, Model::class);
        });
    }
public static function all ( ) { $ command = 'grep --include="*.php" --files-with-matches -r "class" ' . app_path ( ) ; exec ( $ command , $ files ) ; return collect ( $ files ) -> map ( function ( $ file ) { return self :: convertFileToClass ( $ file ) ; } ) -> filter ( function ( $ class ) { return class_exists ( $ class ) && is_subclass_of ( $ class , Model :: class ) ; } ) ; }
Returns a collection of class names for all Eloquent models within your app path.

@return \Illuminate\Support\Collection
Returns a collection of class names for all Eloquent models within your app path .