I ran the following code in laravel,
The showPage function is executed and $user can be passed.
However, user.show is not displayed and a white screen is displayed.

<? php
namespace App \ Http \ Controllers;
use App \ User;
use Illuminate \ Http \ Request;
class UserController extends Controller
    public function show ($id)
        function showView ($user)
            return view ('user.show', compact ('user'));
        $user = User :: findOrFail ($id);
        showView ($user);