You have injected the Request via parameter $request. This is generally not recommended as there might be multiple instances during a request cycle (f.e. when using sub-requests). Instead, it is recommended to inject the RequestStack and retrieve the current request each time you need it via getCurrentRequest().
Loading history...
22
{
23
$this->request = $request;
24
if ($this->onBackend() === true ) {
25
$manager->register(AdminSidebar::class);
26
}
27
}
28
29
private function onBackend()
30
{
31
$url = $this->request->url();
32
if (str_contains($url, config('asgard.core.core.admin-prefix'))) {