1
0
mirror of https://koodu.h-i.works/projects/thebadspace synced 2025-06-25 16:04:37 -05:00

added member create ui

now that editing member work, that process needed to be fleshed out by
adding an admin method to add new members as well. now new members can
be added by an admin

also changed the name of a blade file that wasn't following the template
naming convention
This commit is contained in:
ro
2024-09-27 12:39:56 -06:00
parent 3f838bab8b
commit 19d5324c69
7 changed files with 118 additions and 14 deletions

View File

@ -62,6 +62,13 @@ class MemberController extends Controller
'title' => "Edit Member Info"]);
}
public function createMember(Request $Request)
{
return view('back.member', [
'mode' => 'member-create',
'title' => "Make a new friend"]);
}
//actions
public function profileEdit(Request $request)
{
@ -84,4 +91,15 @@ class MemberController extends Controller
return back()->withErrors([$response['message']]);
}
}
public function memberCreate(Request $request)
{
$token = csrf_token();
$response = $this->member->add($request);
if ($response['status'] == true) {
return redirect('/den/member')->with('message', $response['message']);
} else {
return back()->withErrors([$response['message']]);
}
}
}