feat: allow users to delete/create own profile

This commit is contained in:
2022-04-08 19:40:35 +01:00
parent 85962de188
commit dcbff0f52e
7 changed files with 342 additions and 142 deletions

View File

@@ -192,6 +192,7 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => ['lo
// Further locking down the profile section by adding the middleware to everything but the required routes
Route::group(['prefix' => '/profile'], function () {
Route::get('/settings', [ProfileController::class, 'showProfile'])
->name('showProfileSettings')
->middleware('passwordredirect');
@@ -204,6 +205,13 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => ['lo
->name('showSingleProfile')
->middleware('passwordredirect');
Route::post('user/profile', [ProfileController::class, 'createProfile'])
->name('createProfile')
->middleware('passwordredirect');
Route::delete('user/profile', [ProfileController::class, 'deleteProfile'])
->name('deleteProfile')
->middleware('passwordredirect');
Route::get('/settings/account', [UserController::class, 'showAccount'])