model = $this->route('ad'); $this->transition = $this->getTransition(); // Determine if the user is authorized to perform the transition. return $this->can($this->transition); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { $metaData = $this->model->workflow() ->getMetadataStore() ->getTransitionMetadata(new Transition($this->transition, [], [])); if (is_array($metaData)) { return Arr::get($metaData, 'rules', []); } return []; } }