Muetze42 / nova-menu

Heroicon, Font Awesome, SVG & Image Icon for Nova MenuSection, MenuGroup & MenuItem. And new features like Cards, Iframe, Filter.
https://novapackages.com/packages/norman-huth/nova-menu
19 stars 4 forks source link

Menu filter does not show when running on Octane #48

Open webard opened 9 months ago

webard commented 9 months ago

Hi,

when app is running on Octane with Swoole (I did not tested RR or Franken), MenuFilter::activate needs to be run on every request, not only in Service Provider, which are ran only once at first request.

Solution is class:

namespace App\Octane;

use NormanHuth\NovaMenu\Services\MenuFilter;

class ActivateMenuFilter
{

    public function handle()
    {
        MenuFilter::activate('top');
    }
}

and modification in octane.php:

use App\Octane\ActivateMenuFilter;
...
'listeners' => [
 ...
        RequestReceived::class => [
            ...
            ActivateMenuFilter::class,
        ],
]
Muetze42 commented 9 months ago

I'll have to have a look first. I don't have any contact with Octane and didn't intend to until now.

maria42-bot commented 9 months ago

@Muetze42 created a reference to a task for the project „nova-menu“:
https://todos.huth.it/9b5bc3f5-e7d1-4e28-96e0-1abf8701912d