Laralib\L5scaffold\Makes\MakerTrait::getStubFields PHP Method

getStubFields() protected method

Get fields stubs.
protected getStubFields ( $ui, $type ) : array
return array fields
    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;
    }