Last active
October 8, 2017 02:42
-
-
Save ojhaujjwal/be45651653d2cdc8cec3f1000f690d8d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use App\User; | |
use App\Repositories\UserRepository; | |
use App\Http\Controllers\Controller; | |
class UserController extends Controller | |
{ | |
protected $userRepository; | |
public function __construct(UserRepository $userRepository) | |
{ | |
$this->userRepository = $userRepository; | |
} | |
public function show($id) | |
{ | |
$user = $this->userRepository->find($id); | |
return view('user.profile', ['user' => $user]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment