<?php return ['name' => 'Utility B', 'description' => scaffold_cache()->remember('specialDescription', 1, function () { return 'The bilge rat commands with grace, drink the pacific ocean before it hobbles.'; })];
<?php return ['name' => 'Tv', 'description' => 'Raid me cannibal, ye mighty son!', 'basePath' => __DIR__ . '/resources/', 'tasks' => [\Aedart\Scaffold\Tasks\AskForTemplateData::class, \Aedart\Scaffold\Tasks\AskForTemplateDestination::class, \Aedart\Scaffold\Tasks\CreateDirectories::class, \Aedart\Scaffold\Tasks\CopyFiles::class, \Aedart\Scaffold\Tasks\GenerateFilesFromTemplates::class], 'folders' => ['src' => ['Controllers']], 'files' => ['files/README.md' => 'README.md'], 'templateData' => ['controllerName' => ['type' => \Aedart\Scaffold\Contracts\Templates\Data\Type::QUESTION, 'question' => 'Controller Class name name?', 'value' => scaffold_cache()->remember('controllerClass', 10, function () { // If caching utility isn't configured correctly, just invoking the // scaffold_cache() will fail. return 'MyController'; })]], 'templates' => ['controller' => ['source' => 'templates/controller.php.twig', 'destination' => ['type' => \Aedart\Scaffold\Contracts\Templates\Data\Type::QUESTION, 'question' => 'Controller Filename?', 'value' => 'src/Controllers/MyController.php']]], 'scripts' => ['echo Freebooters stutter from powers like proud shores.', ['timeout' => 10, 'script' => 'ls'], function (array $config) { $script = 'cd ' . $config['outputPath'] . ' && ls'; return new \Aedart\Scaffold\Scripts\CliScript(['timeout' => 10, 'script' => $script]); }]];
<?php return ['name' => 'Cache Values', 'description' => 'To be used for testing only - test if caching works', 'basePath' => __DIR__ . '/resources/', 'tasks' => [\Aedart\Scaffold\Tasks\AskForTemplateData::class], 'templateData' => ['sentence' => ['value' => scaffold_cache()->remember('mySentence', 10, function () { return 'Damn yer grog, feed the lass.'; }), 'postProcess' => function ($answer) { return scaffold_cache_get('mySentence'); }]]];
/** * Flushes the registered cache directory * * @return void */ function scaffold_cache_flush() { $cache = scaffold_cache(); /** @var \Illuminate\Contracts\Cache\Store $store */ $store = $cache->getStore(); $store->flush(); }