FleetCart/Modules/Account/Http/Controllers/AccountProfileController.php
2023-12-03 14:07:47 +00:00

39 lines
848 B
PHP

<?php
namespace Modules\Account\Http\Controllers;
use Illuminate\Http\Response;
use Modules\User\Http\Requests\UpdateProfileRequest;
class AccountProfileController
{
/**
* Show the form for editing the specified resource.
*
* @return Response
*/
public function edit()
{
return view('public.account.profile.edit', [
'account' => auth()->user(),
]);
}
/**
* Update the specified resource in storage.
*
* @param UpdateProfileRequest $request
*
* @return Response
*/
public function update(UpdateProfileRequest $request)
{
$request->bcryptPassword();
auth()->user()->update($request->all());
return back()->with('success', trans('account::messages.profile_updated'));
}
}