1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 20:34:03 +00:00

Introduce integration events, drop

This commit is contained in:
Samuel Štancl 2019-08-19 20:28:20 +02:00
parent 4342c5eb1b
commit 4c80ba78d3
2 changed files with 44 additions and 7 deletions

View file

@ -59,13 +59,8 @@ class TenancyServiceProvider extends ServiceProvider
public function setTelescopeTags()
{
$original_callback = Telescope::$tagUsing;
Telescope::tag(function (\Laravel\Telescope\IncomingEntry $entry) use ($original_callback) {
$tags = [];
if (! \is_null($original_callback)) {
$tags = $original_callback($entry);
}
Telescope::tag(function (\Laravel\Telescope\IncomingEntry $entry) {
$tags = $this->integration('telescope', $entry);
if (\in_array('tenancy', request()->route()->middleware())) {
$tags = \array_merge($tags, [