src/Factories/StubbedResourceFileFactory.php
/**
     * Create a resource file.
     *
     * @param Resource $resource
     */
Create a resource file.
@param Resource $resource
Create a resource file . @param Resource $resource
public static function handle(Resource $resource): void
    {
        $directory = static::getFileDirectory($resource);
        DirectoryMaker::findOrMake($directory);
        $content = StubBuilder::build(static::getFileType(), $resource->toArray());
        $path = $directory . '/' . static::getFileName($resource);
        FileMaker::make($path, $content);
    }
public static function handle ( Resource $ resource ) : void { $ directory = static :: getFileDirectory ( $ resource ) ; DirectoryMaker :: findOrMake ( $ directory ) ; $ content = StubBuilder :: build ( static :: getFileType ( ) , $ resource -> toArray ( ) ) ; $ path = $ directory . '/' . static :: getFileName ( $ resource ) ; FileMaker :: make ( $ path , $ content ) ; }
Create a resource file.
Create a resource file .