Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getLocalizedPageLabel, type string, array given #316

Closed
bamod33 opened this issue Jan 18, 2024 · 2 comments
Closed

getLocalizedPageLabel, type string, array given #316

bamod33 opened this issue Jan 18, 2024 · 2 comments

Comments

@bamod33
Copy link

bamod33 commented Jan 18, 2024

Error: BezhanSalleh\FilamentShield\FilamentShield::getLocalizedPageLabel(): Argument #1 ($page) must be of type string, array given, called in /vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 355

In function:

`public static function getPageOptions(): array

{

    return collect(FilamentShield::getPages())

        ->flatMap(fn ($pagePermission) => [

            $pagePermission => FilamentShield::getLocalizedPageLabel($pagePermission),

        ])

        ->toArray();

}`

(Laravel 10, PHP 8.3, Filament v3.2.3)

Previously it was working well, it seems that a composer update broke something

@bezhanSalleh
Copy link
Owner

Most likely you have published the shield resource. So republish it again and adjust your code accordingly if any.

@bamod33
Copy link
Author

bamod33 commented Jan 19, 2024

Most likely you have published the shield resource. So republish it again and adjust your code accordingly if any.

Solved, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants