Skip to content

Event listener - bagisto.admin.layout.head #430

@wontone18

Description

@wontone18

Terms

  • Before you openning this issue, i have checked if the issue has already been reported.

Bagisto Version(s) affected

2.3

Issue Description

Hi

I am a regular package developer for Bagisto. Recently, I started using your updated version, and I’m trying to add my custom admin menu icon to the header. However, the event listener is not working as expected.

My icon only appears when my extension’s route is active. But when I navigate to other core packages of Bagisto, the icon disappears because the following event is not triggered:

Event::listen('bagisto.admin.layout.head', function ($viewRenderEventManager) {
    $viewRenderEventManager->addTemplate('ship::admin.layouts.style');
});


Preconditions

Laravel 11
OS - MAC and Herd
Bagisto 2.3

Steps to reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected Result

In the admin.layouts.style file, I have included a link to my vendor package, which points to the compiled assets. However, if the event is not triggered, this code does not load, and therefore, the assets are not included.

Actual Result

Event::listen('bagisto.admin.layout.head', function ($viewRenderEventManager) {
    // dd('I am testing');
});


I also tried with this but not working. Even though my service provider working fine.

Screenshots

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions