password forgot to encrypt

init-template
ajikamaludin 2 years ago
parent 2ee3e850bd
commit 5c9bc57f84
No known key found for this signature in database
GPG Key ID: E4F565A376B260B7

@ -39,7 +39,11 @@ class UserController extends Controller
'password' => 'required|string|min:6',
]);
User::create($request->only(['name', 'email', 'password']));
User::create([
'name' => $request->name,
'email' => $request->email,
'password' => bcrypt($request->password),
]);
return redirect()->route('users.index');
}
@ -61,7 +65,7 @@ class UserController extends Controller
$user->update($request->only(['name', 'email']));
if ($request->password != null) {
$user->update(['password' => $request->password]);
$user->update(['password' => bcrypt($request->password)]);
}
return redirect()->back();

@ -10,11 +10,32 @@ export default function Dashboard(props) {
>
<Head title="Dashboard" />
<div className="max-w-7xl mx-auto sm:px-6 lg:px-8">
<div className="bg-base-100 overflow-hidden shadow-sm">
<div className="p-6 bg-base-100 border-b border-base-200">You're logged in!</div>
<div className='max-w-7xl mx-auto sm:px-6 lg:px-8 flex justify-between space-x-1'>
<div class="stats bg-base-100 border-base-300 border md:w-1/4">
<div class="stat">
<div class="stat-title">Dokumen Aktif</div>
<div class="stat-value">1,400</div>
</div>
</div>
<div class="stats bg-base-100 border-base-300 border md:w-1/4">
<div class="stat">
<div class="stat-title">Dokumen Diperbarui</div>
<div class="stat-value">2,400</div>
</div>
</div>
<div class="stats bg-base-100 border-base-300 border md:w-1/4">
<div class="stat">
<div class="stat-title">Dokumen Berakhir</div>
<div class="stat-value">1,400</div>
</div>
</div>
<div class="stats bg-base-100 border-base-300 border md:w-1/4">
<div class="stat">
<div class="stat-title">Total Dokumen</div>
<div class="stat-value">4,400</div>
</div>
</div>
</div>
</AuthenticatedLayout>
);
}

Loading…
Cancel
Save