Here it is
public function store(CreateAdmin $request)
{
$admin = new Admin;
$admin->name = $request->name;
$admin->member_no = '1';
$admin->active = 'Y';
$admin->password = Hash::make($request->pin);
$admin->void_code = $request->void_code;
$admin->save();
$za_id = $admin->id;
$update = Admin::findOrFail($za_id);
$update->member_no = 'ZA' . $za_id;
$update->save();
return redirect('admin');
}
This solved my problem:
'password' => 'required|between:6,8',
llagerlof liked this reply
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community