We combine all of the steps in previous videos into one self-contained migration file.
In a combined migration file, the safeUp method would look like this:
public function safeUp()
{
return($this->_addFormSection() &&
$this->_addFormGroup() &&
$this->_addFormFields() &&
$this->_addFieldLayout()
);
}
The return statement would call the different private methods and run the code to do a part of the overall migration.
Follow along with the full transcript
Search every word, click any line to jump to that moment, and read along as you watch — a CraftQuest Premium feature.
Sign up for Premium