lumberjack-core icon indicating copy to clipboard operation
lumberjack-core copied to clipboard

Allow dot syntax when checking if a session has a value

Open adamtomat opened this issue 4 years ago • 2 comments

Given:

session()->put([
    'foo' => [
        'bar' => 123,
    ],
]);

I expected session()->has('foo.bar') to return true, however it returns false because it currently doesn't support dot syntax.

This MR is to allow dot syntax for the has method on the session store object.

adamtomat avatar Jun 03 '21 16:06 adamtomat

Coverage Status

Coverage remained the same at 88.698% when pulling 7f586de03d745de770b34ed41665f30e23d93c79 on allow-dot-syntax-for-session-has into d877406e17c31781656441691f2a6a25abdb7140 on master.

coveralls avatar Jun 03 '21 16:06 coveralls

@adamtomat we need to add a test for this behaviour before merging.

joelambert avatar Oct 01 '21 16:10 joelambert