Skip to content

Instantly share code, notes, and snippets.

@bkozora
Created January 5, 2015 15:31
Show Gist options
  • Save bkozora/f5612ba9d8080f6b53b1 to your computer and use it in GitHub Desktop.
Save bkozora/f5612ba9d8080f6b53b1 to your computer and use it in GitHub Desktop.
Laravel - Define Layout on a Controller
class UserController extends BaseController {
/**
* The layout that should be used for responses.
*/
protected $layout = 'layouts.master';
/**
* Show the user profile.
*/
public function showProfile()
{
$this->layout->content = View::make('user.profile');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment