mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 09:18:54 +00:00
22 lines
525 B
PHP
22 lines
525 B
PHP
<?php
|
|
|
|
namespace App\Support\Database;
|
|
|
|
trait CacheQueryBuilder
|
|
{
|
|
/**
|
|
* Taken from https://laracasts.com/discuss/channels/guides/never-execute-a-duplicate-query-again
|
|
*
|
|
* Get a new query builder instance for the connection.
|
|
*
|
|
* @return \Illuminate\Database\Query\Builder
|
|
*/
|
|
protected function newBaseQueryBuilder()
|
|
{
|
|
$conn = $this->getConnection();
|
|
|
|
$grammar = $conn->getQueryGrammar();
|
|
|
|
return new Builder($conn, $grammar, $conn->getPostProcessor());
|
|
}
|
|
} |