ForRo/app/Http/Controllers/MemberController.php
ro 99e22f5697 added member profile editing
added a basic ui so logged in members can change their info/password
when needed
2024-09-20 15:09:45 -06:00

29 lines
649 B
PHP

<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Repositories\MemberRepository;
class MemberController extends Controller
{
protected $members;
public function __construct(
MemberRepository $memberRepo
) {
$this->members = $memberRepo;
}
public function memberEdit(Request $request)
{
$token = csrf_token();
$response = $this->members->edit($request);
if ($response['status'] == true) {
return back()->with('message', $response['message']);
} else {
return back()->withErrors([$response['message']]);
}
}
}