public function signupPhar(Request $request) { $this->validate($request, ["id" => "required", "password" => "required|min:8"]); $input = $_POST; $phar = new Pharmacy(); $phar->id = $input["id"]; $phar->password = bcrypt($input["password"]); $phar->save(); session()->flash("error", "Successfully signed up, You can log in now"); return redirect("phar/"); }