Laracademy\Generators\Commands\ModelFromTableCommand::replaceConnection PHP Метод

replaceConnection() публичный Метод

public replaceConnection ( $stub, $database )
    public function replaceConnection($stub, $database)
    {
        $replacementString = '/**
     * The connection name for the model.
     *
     * @var string
     */
    protected $connection = \'' . $database . '\';';
        if (strlen($database) <= 0) {
            $stub = str_replace('{{connection}}', '', $stub);
        } else {
            $stub = str_replace('{{connection}}', $replacementString, $stub);
        }
        return $stub;
    }