Commit 0a2f489e by hfpp2012 yinsigan

Social Network Profile

1 parent af95d707
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\User;
class ProfileController extends Controller
{
public function profile($username)
{
// return $username;
$user = User::whereUsername($username)->first();
// $user = User::where('username', $username)->first();
// $user = User::where('username', '=', $username)->first();
return $user;
dd($user);
}
}
......@@ -42,3 +42,5 @@ Route::post('users', 'UsersController@store');
Auth::routes();
Route::get('home', 'HomeController@index')->name('home');
Route::get('/profile/{username}', 'ProfileController@profile');
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!