protected function getStubFields($ui, $type)
{
$stubsFieldsPath = $this->getStubPath() . "views/{$ui}/fields/{$type}/";
if ($this->existsDirectory($stubsFieldsPath)) {
$this->scaffoldCommandM->error('Stub not found');
return;
}
$stubsFieldsFiles = $this->getFilesRecursive($stubsFieldsPath);
$stubs = [];
foreach ($stubsFieldsFiles as $file) {
$stubs[str_replace($stubsFieldsPath, '', $file)] = $this->getFile($file);
}
return $stubs;
}