diff --git a/IES-Bandung/app/Http/Controllers/ProfileController.php b/IES-Bandung/app/Http/Controllers/ProfileController.php index 0f0d585782aa4bffdf0723650c60ec33bd1396d1..106da58cd4f231de7592eb9f5ba3010279fe8055 100644 --- a/IES-Bandung/app/Http/Controllers/ProfileController.php +++ b/IES-Bandung/app/Http/Controllers/ProfileController.php @@ -23,7 +23,7 @@ class ProfileController extends Controller public function index() { if (Auth::check()) { $username = Auth::user()['username']; - return $this->showProfile($username); + return redirect('/profile/'.$username); } else { return redirect('/login'); diff --git a/IES-Bandung/app/Http/Controllers/PublicUserController.php b/IES-Bandung/app/Http/Controllers/PublicUserController.php index d7f652d81ae2e1f5929d4315223b00b3455b93d0..3d1ce3cd3d51dd115ab86f58e4a4cd8f92fafba3 100644 --- a/IES-Bandung/app/Http/Controllers/PublicUserController.php +++ b/IES-Bandung/app/Http/Controllers/PublicUserController.php @@ -72,6 +72,6 @@ class PublicUserController extends Controller } $user->save(); } - // return redirect('/profile'); + return redirect('/profile'); } } diff --git a/IES-Bandung/app/Http/routes.php b/IES-Bandung/app/Http/routes.php index 13a2002158e2b8c70d6ed42d487329d6e1efea12..5d64ec0fe945786d082993debb8e6aea907f83a4 100755 --- a/IES-Bandung/app/Http/routes.php +++ b/IES-Bandung/app/Http/routes.php @@ -23,7 +23,7 @@ Route::get('/home', 'HomeController@index'); Route::get('/profile', 'ProfileController@index'); Route::get('/profile/{username}', ['uses' => 'ProfileController@showProfile']); -// Route::post('/profile/edit', ['uses' => 'PublicUserController@editProfile']); +Route::post('/profile/edit', ['uses' => 'PublicUserController@editProfile']); // Vendor's object sell Route::post('/item/add', 'ObjectSellController@createObjectSell');