for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace BeyondCode\QueryDetector\Concerns;
use Illuminate\Support\Str;
trait HasContext
{
/** @var string */
protected $context = 'querydetector';
/**
* Set specific context for the executed queries.
*
* @param string $context
* @return self
*/
public function setContext(string $context): self
$this->context = $context;
return $this;
}
* Get the current context name
public function getContext(): string
return $this->context;
* Generate a new context for the executed queries.
public function newContext(): self
$this->setContext(Str::random());