Skip to content

Conversation

@ph7jack
Copy link
Contributor

@ph7jack ph7jack commented Sep 10, 2023

Hi everyone,

I've introduced a minor enhancement to the MessageBag class by adding the missing method. This change was primarily motivated by the need for a more intuitive code reading and to bring a more descriptive method name that communicates its functionality with clarity.

Changes:

  • Added the missing method in the MessageBag class.

Code Example:

Before

<div @class([
    'success-classes' => !$errors->has('some-key'),
    'error-classes'   =>  $errors->has('some-key'),
])>
    ...
</div>

After

<div @class([
    'success-classes' => $errors->missing('some-key'),
    'error-classes'   => $errors->has('some-key'),
])>
    ...
</div>

Benefits:

  • Promotes easier code reading by providing a self-explanatory method name.
  • The method name is intuitive, reducing potential confusion for developers.

I believe this addition will be of great benefit to the Laravel community and look forward to your feedback.

Thank you for considering this PR.

Feel free to adjust the wording as necessary to match your style and the specific changes you've made!

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

Successfully merging this pull request may close these issues.

2 participants