/home/techb158/ileadtechnology.com/SSM/vendor/laravel/telescope/src/Watchers
Edit: /home/techb158/ileadtechnology.com/SSM/vendor/laravel/telescope/src/Watchers/GateWatcher.php (2034B)
shouldIgnore($ability)) {
return;
}
$caller = $this->getCallerFromStackTrace();
Telescope::recordGate(IncomingEntry::make([
'ability' => $ability,
'result' => $result ? 'allowed' : 'denied',
'arguments' => $this->formatArguments($arguments),
'file' => $caller['file'],
'line' => $caller['line'],
]));
return $result;
}
/**
* Determine if the ability should be ignored.
*
* @param string $ability
* @return bool
*/
private function shouldIgnore($ability)
{
return Str::is($this->options['ignore_abilities'] ?? [], $ability);
}
/**
* Format the given arguments.
*
* @param array $arguments
* @return array
*/
private function formatArguments($arguments)
{
return collect($arguments)->map(function ($argument) {
return $argument instanceof Model ? FormatModel::given($argument) : $argument;
})->toArray();
}
}