Laravel - Collections - Method Unwrap

The static unwrap method returns the collection's underlying items from the given value when applicable:

    
    Collection::unwrap(collect('John Doe'));
    
    // ['John Doe']
    
    Collection::unwrap(['John Doe']);
    
    // ['John Doe']
    
    Collection::unwrap('John Doe');
    
    // 'John Doe'