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

[MANUAL] deprecated showIf ?? #902

Open
abkrim opened this issue Apr 9, 2024 · 0 comments
Open

[MANUAL] deprecated showIf ?? #902

abkrim opened this issue Apr 9, 2024 · 0 comments

Comments

@abkrim
Copy link

abkrim commented Apr 9, 2024

Describe the bug
Conditionally showing items show:

Conditionally showing items

You can conditionally show things using the showIf method. If you pass a truthy value, the item will be displayed.

ray('will be shown')->showIf(true);
ray('will not be shown')->showIf(false);

You can also pass a callable to showIf. If the callable returns a truthy value, it will be shown. Otherwise, it will not.

But showIf is marked deprectaed.

    /**
     * @deprecated Use `if` instead of this method
     */
    public function showIf($boolOrCallable): self
    {
        return $this->showWhen($boolOrCallable);
    }

Versions
Ray version (you can see this in "About Ray"): Versión 2.7.5 (2.7.5)

You can use composer show to get the version numbers of:

  • spatie/ray package version: 1.41.1
  • spatie/laravel-ray package version (if applicable): 1.36.0

PHP version: 8.2.17 (cli)
Laravel version (if applicable): 10.48.4

Desktop (please complete the following information):

  • OS: macOs
  • Version 14.4.1

Castrissitelight – SingleTriggerActionTest php0409090154

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

1 participant