public function check(Request $request) { //Star::logDebug("Checking requirements for action '{0}'", $this->name); foreach ($this->requirements as $requirement) { if (!$request->hasInput($requirement)) { //Star::logDebug("Missing required parameter '{0}' for action '{1}', action not executed", $requirement, $this->name); return false; } else { //Star::logDebug("Parameter '{0}' for action '{1}' defined", $requirement, $this->name); } } return true; }
public function execute(Request $request) { return ["name" => $request->getInput('name')]; }