Skip to content

Instantly share code, notes, and snippets.

@de-raaf-media
Last active January 26, 2018 16:11
Show Gist options
  • Save de-raaf-media/b94d210787e807a95a1c62efe6b54dbe to your computer and use it in GitHub Desktop.
Save de-raaf-media/b94d210787e807a95a1c62efe6b54dbe to your computer and use it in GitHub Desktop.
Laravel: Default controller
<?php
namespace App\Http\Controllers;
use App\User;
use App\Http\Controllers\Controller;
class UserController extends Controller
{
/**
* Show the profile for the given user.
*
* @param int $id
* @return Response
*/
public function show($id)
{
$user = User::findOrFail($id);
return view('user.profile', compact('user'));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment