Laravel\Envoy\TaskContainer::getMacro PHP Method

getMacro() public method

Get the given macro from the container.
public getMacro ( string $macro ) : array | null
$macro string
return array | null
    public function getMacro($macro)
    {
        return array_get($this->macros, $macro);
    }

Usage Example

Example #1
0
 /**
  * Get the tasks from the container based on user input.
  *
  * @param  \Laravel\Envoy\TaskContainer  $container
  * @return void
  */
 protected function getTasks($container)
 {
     $tasks = [$task = $this->argument('task')];
     if ($macro = $container->getMacro($task)) {
         $tasks = $macro;
     }
     return $tasks;
 }