Skip to content

Instantly share code, notes, and snippets.

@simonhamp
Created May 22, 2020 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonhamp/9a5c0ab7cbceef255f937deaa7591080 to your computer and use it in GitHub Desktop.
Save simonhamp/9a5c0ab7cbceef255f937deaa7591080 to your computer and use it in GitHub Desktop.
Prime your Stache
<?php
namespace Statamic\Addons\MyAddon\Commands;
use Statamic\API\Stache;
use Statamic\Extend\Command;
class StachePrimeCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'stache:wax';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Prepare for another hot day in Miami';
/**
* Create a new command instance.
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
Stache::update();
$this->info('Your Stache is ready, Magnum!');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment