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:
@ -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']]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user