Skip to content

Instantly share code, notes, and snippets.

@davidhemphill
Last active August 2, 2016 15:31
Show Gist options
  • Save davidhemphill/397ace10f7f31a070b4ea6e7d5b66555 to your computer and use it in GitHub Desktop.
Save davidhemphill/397ace10f7f31a070b4ea6e7d5b66555 to your computer and use it in GitHub Desktop.
<?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);
}
}
<?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