Illuminate\Database\Connection::pretend PHP Метод

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

Execute the given callback in "dry run" mode.
public pretend ( Closure $callback ) : array
$callback Closure
Результат array
    public function pretend(Closure $callback)
    {
        $loggingQueries = $this->loggingQueries;
        $this->enableQueryLog();
        $this->pretending = true;
        $this->queryLog = [];
        // Basically to make the database connection "pretend", we will just return
        // the default values for all the query methods, then we will return an
        // array of queries that were "executed" within the Closure callback.
        $callback($this);
        $this->pretending = false;
        $this->loggingQueries = $loggingQueries;
        return $this->queryLog;
    }