In Laravel, Facades are used to provide a static interface to classes available inside the application’s service container.
Now, unlike conventional static method calls, facades can be mocked in Laravel. It can be done using the shouldRecieve method, which shall return an instance of a facade mock.
$value = Cache::get('key');
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.