Last active
August 2, 2016 15:31
-
-
Save davidhemphill/397ace10f7f31a070b4ea6e7d5b66555 to your computer and use it in GitHub Desktop.
This file contains hidden or 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\Controller; | |
use App\User; | |
use App\Users\UserPresenter; | |
class UserController | |
{ | |
public function edit($id) | |
{ | |
$user = new UserPresenter(User::findOrFail($id)); | |
return view('user.edit')->with($user); | |
} | |
} |
This file contains hidden or 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\Controller; | |
use App\User; | |
class UserController | |
{ | |
public function edit($id) | |
{ | |
$user = User::findOrFail($id)->present(); | |
return view('user.edit')->with($user); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment