How to get all values from session which start with certain key

Posted 6 months ago by hsntngr

As the title, I want to get all values from session which start with certain value.

For example, I'm counting post views in my project and I'm storing them on session. Then I want to reach all stored viewed values on session..

Session::put("views.".$post->id);

How can I get all stored views ?

is there any way to do it something like below ?

Session::get("views.*");

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.