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

boolean column template error #215

Closed
AndreyBobrov opened this issue Nov 2, 2016 · 2 comments
Closed

boolean column template error #215

AndreyBobrov opened this issue Nov 2, 2016 · 2 comments

Comments

@AndreyBobrov
Copy link

AndreyBobrov commented Nov 2, 2016

Default boolean template uses following syntax:

{{ trans('backpack::crud.yes', 'Yes') }}

but Laravel trans() helper doesn't accept second argument as default value and it must be an array:

    /**
     * Get the translation for a given key.
     *
     * @param  string  $id
     * @param  array   $parameters
     * @param  string  $domain
     * @param  string  $locale
     * @return string|array|null
     */
    public function trans($id, array $parameters = [], $domain = 'messages', $locale = null)
    {
        return $this->get($id, $parameters, $locale);
    }

thus the use of boolean column causes an PHP error:

exception 'ErrorException' with message 'Argument 2 passed to Illuminate\Translation\Translator::trans() must be of the type array, string given

@OwenMelbz
Copy link
Contributor

@tabacitu I think you added this change? Did you have a plan/know about this?

@AndreyBobrov
Copy link
Author

fixed 5780563

This was referenced Apr 2, 2020
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