Closed BelyaevAD closed 1 year ago
@BelyaevAD Are you on the latest version?
Yes, all packages have latest version.
Tried doing the following steps:
sail composer install
sail composer run-script post-autoload-dump
sail composer run-script post-update-cmd
sail artisan optimize:clear
sail artisan octane:reload
I use sail+octane+roadrunner in production.
And it works correctly through tinker:
Maybe the problem is this: https://github.com/livewire/livewire/pull/3987
Hm, that shouldn't be a problem. The singleton is bound as a scoped
singleton meaning it only lasts as long as a single request, even inside of Octane...
To work properly, you need to use Filament::serving
I recommend adding this to the documentation.
Example:
add in App\Providers\AppServiceProvider
:
public function boot()
{
Filament::serving(function () {
FilamentNavigation::addItemType('Routes', [
Select::make('route')
->searchable()
->options(function () {
return Helper::routeList();
}),
TextInput::make('params')->label('explode params by separator "|" '),
]);
FilamentNavigation::addItemType('BlogCategories', [
Select::make('list')
->multiple()
->options(function () {
return Helper::blogCategories();
}),
]);
});
}
Feel free to open a PR!
Hello, @ryangjchandler
Registering new types "FilamentNavigation::addItemType()" does not work through AppServiceProvider when using "laravel/octane" and roadrunner