Switch statements are considered to be code smells so try to avoid using them. The only place you should use a switch statement might be in a Factory class (using the Factory design pattern).
The switch statement can be refactored into a private method (or class if you are going add more tabs).
$auth->check() can go into it's own private method, and be called in the method where you check the request.
$doneTestId check can go to it's own private method.
$key can go to it's own private method;
caching can go to it's own private method.
$tests->appends(); can go to it's own private method;
The end result will look like this:
public function execute($request)
{
$this->checkRequest($request->tab);
$doneTestId = $this->getDoneTestId();
$key = $this->getKey()
$tests = $this->cacheTests($tests);
$this->appendTests($tests, $requestTab);
return View::make('quiz.index', compact('tests', 'name', 'doneTestId'));
}
This is just a quick example, I didn't try it, I don't know if it works, so I might've missed something. (it is just an idea) Also, I don't have a lot of explanation what are you trying to do so I just guessed it.
You can even improve this if you move some of this logic in few classes and call some of the methods in some kind of service so the controller doesn't have to do anything that is not his job.