Skip to content
Snippets Groups Projects
Commit acb52d12 authored by David's avatar David
Browse files

edit profile now works

parent 916b933b
No related merge requests found
...@@ -23,7 +23,7 @@ class ProfileController extends Controller ...@@ -23,7 +23,7 @@ class ProfileController extends Controller
public function index() { public function index() {
if (Auth::check()) { if (Auth::check()) {
$username = Auth::user()['username']; $username = Auth::user()['username'];
return $this->showProfile($username); return redirect('/profile/'.$username);
} }
else { else {
return redirect('/login'); return redirect('/login');
......
...@@ -72,6 +72,6 @@ class PublicUserController extends Controller ...@@ -72,6 +72,6 @@ class PublicUserController extends Controller
} }
$user->save(); $user->save();
} }
// return redirect('/profile'); return redirect('/profile');
} }
} }
...@@ -23,7 +23,7 @@ Route::get('/home', 'HomeController@index'); ...@@ -23,7 +23,7 @@ Route::get('/home', 'HomeController@index');
Route::get('/profile', 'ProfileController@index'); Route::get('/profile', 'ProfileController@index');
Route::get('/profile/{username}', ['uses' => 'ProfileController@showProfile']); 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 // Vendor's object sell
Route::post('/item/add', 'ObjectSellController@createObjectSell'); Route::post('/item/add', 'ObjectSellController@createObjectSell');
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment