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

[8.x] Ensure attribute is Collection when casting even if value is null #36730

Closed
wants to merge 6 commits into from

Commits on Mar 24, 2021

  1. Ensure attribute is Collection when casting even if value is null

    Maintains `null` value in database if the value is still empty and the original value was `null`
    
    When casting attribute to `asCollection` you can now start using it without checking if it is set or not.
    u12206050 authored Mar 24, 2021
    Configuration menu
    Copy the full SHA
    7dfa6f5 View commit details
    Browse the repository at this point in the history
  2. Tidy up code

    u12206050 authored Mar 24, 2021
    Configuration menu
    Copy the full SHA
    af2e836 View commit details
    Browse the repository at this point in the history
  3. Remove wasNull function

    u12206050 authored Mar 24, 2021
    Configuration menu
    Copy the full SHA
    3b796f0 View commit details
    Browse the repository at this point in the history
  4. Check null instead of empty

    Allow setting the attribute to an empty array or even resetting back to null
    u12206050 authored Mar 24, 2021
    Configuration menu
    Copy the full SHA
    223cdfb View commit details
    Browse the repository at this point in the history
  5. Update src/Illuminate/Database/Eloquent/Casts/AsCollection.php

    Co-authored-by: Tom Irons <tom.irons@hotmail.com>
    u12206050 and tomirons authored Mar 24, 2021
    Configuration menu
    Copy the full SHA
    5a9c390 View commit details
    Browse the repository at this point in the history
  6. Update src/Illuminate/Database/Eloquent/Casts/AsCollection.php

    Co-authored-by: Tom Irons <tom.irons@hotmail.com>
    u12206050 and tomirons authored Mar 24, 2021
    Configuration menu
    Copy the full SHA
    9c78665 View commit details
    Browse the repository at this point in the history