Bosnadev\Repositories\Console\Commands\Creators\CriteriaCreator::populateStub PHP Method

populateStub() protected method

Populate the stub.
protected populateStub ( ) : mixed
return mixed
    protected function populateStub()
    {
        // Populate data
        $populate_data = $this->getPopulateData();
        // Stub
        $stub = $this->getStub();
        // Loop through the populate data.
        foreach ($populate_data as $search => $replace) {
            // Populate the stub.
            $stub = str_replace($search, $replace, $stub);
        }
        // Return the stub.
        return $stub;
    }