Your IP : 3.129.42.59


Current Path : /home/lentoinv/props/vendor/laravel/framework/src/Illuminate/Database/Concerns/
Upload File :
Current File : /home/lentoinv/props/vendor/laravel/framework/src/Illuminate/Database/Concerns/ExplainsQueries.php

<?php

namespace Illuminate\Database\Concerns;

use Illuminate\Support\Collection;

trait ExplainsQueries
{
    /**
     * Explains the query.
     *
     * @return \Illuminate\Support\Collection
     */
    public function explain()
    {
        $sql = $this->toSql();

        $bindings = $this->getBindings();

        $explanation = $this->getConnection()->select('EXPLAIN '.$sql, $bindings);

        return new Collection($explanation);
    }
}

?>