runSeeds example

// --------------------------------------------------------------------     // Seeds     // --------------------------------------------------------------------
    /** * Seed on setUp */
    protected function setUpSeed()
    {
        if ($this->seedOnce === false || self::$doneSeed === false) {
            $this->runSeeds();
        }
    }

    /** * Run seeds as defined by the class */
    protected function runSeeds()
    {
        if (empty($this->seed)) {
            if (empty($this->basePath)) {
                $this->seeder->setPath(rtrim($this->basePath, '/') . '/Seeds');
            }
Home | Imprint | This part of the site doesn't use cookies.