Jump to content
MakeWebGames

rockwood

Members
  • Posts

    452
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by rockwood

  1. you can make it more better
  2. can i see the code of GL?
  3. if you need more member then i am able to join your project
  4. global $db; personally i don't like global https://www.quora.com/Are-global-variables-considered-bad-practice-in-PHP#:~:text=Global variables are not a,you wish to use globally.
  5. really very positive idea 😀
  6. need more info about it
  7. good question laravel is not only around eloquent
  8. i know that is from years i don't like eloquent
  9. i am aware with eloquent
  10. its time taking thing me too working from long time https://github.com/Cyberiaaxis/Rockwood but i am not selling it
  11. cd /code/laravel_project php artisan cache:clear php artisan config:clear sudo service php8.0-fpm stop sudo service nginx stop sudo chown -R $USER:www-data storage sudo chown -R $USER:www-data bootstrap/cache chmod -R 775 storage chmod -R 755 bootstrap/cache sudo service php8.0-fpm start && sudo service nginx start (i don't know your php's package version )
  12. it's Vue and what is in backend? and i am unable to see inside how can i registration in?
  13. in which engine?
  14. i am doing in MUI
  15. is bootstrapped for css?
  16. which game engine you are using?
  17. really good approach
  18. how do you make guarantee it will be make enough income for divide. we are noticing only torn game from years. in my view not only 1 ot 2 people can make a good one. in my view for a good platform "team effort makes successful" from first day you can't make profilt from anything. my observation "patience and efforts works only"
  19. what was the cause for error?
  20. i like mafia games
  21. any one using React for development here?
  22. i am not sure what do means by secure here? make sure you are passing correct data type to and it's validated
  23. my point is code should be indent and reasonable instead this and that
  24. import { useState, useEffect, useContext } from "react"; import "../styles/LoginForm.scss"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faUser, faKey, faArrowAltCircleRight } from "@fortawesome/free-solid-svg-icons"; import { useForm } from "react-hook-form"; import Fetch from "../libraries/Fetch"; import Model from "./Model"; import RegistrationForm from "./RegistrationForm"; import ForgetPassword from "./ForgetPassword"; import { useNavigate, Link } from "react-router-dom"; import { AuthContext } from "../libraries/AuthContext"; const Login = () => { const { user, setUser } = useContext(AuthContext); const [showRegistrationModal, setRegistrationModal] = useState(false); const [showForgetModal, setForgetModal] = useState(false); const handleOK = (event) => { console.log(event); }; const { register, setError, formState: { errors }, handleSubmit, clearErrors, } = useForm(); const navigate = useNavigate(); const onSubmit = async (data) => { const result = await Fetch("auth/login", { method: "post", data }); if (result.user) { const userDetails = { userId: result.user.id, accessToken: result.access_token, loggedIn: true, }; setUser(userDetails); navigate("/dashboard"); } else { for (const [fieldName, errors] of Object.entries(result.errors)) { setError(fieldName, { type: "manual", message: errors[0], }); } setTimeout(() => { clearErrors(); }, 5000); } }; return ( <> <div> <span className="top" onClick={() => { setForgetModal(true); setRegistrationModal(false); }}> Recover Account </span> <form className="form-inline" method="post" onSubmit={handleSubmit(onSubmit)}> <div className="form-group"> <div className="input-group"> <span className="form-addon"> <FontAwesomeIcon icon={faUser} color="#63102f" size="xs" /> </span> <input type="email" placeholder="Username" {...register("email", { required: true })} /> </div> </div> <div className="form-group"> <div className="input-group"> <span className="form-addon"> <FontAwesomeIcon icon={faKey} color="#63102f" size="xs" /> </span> <input type="password" placeholder="Password" className="form-control" {...register("password", { required: true })} /> </div> </div> <div className="form-group"> <button type="submit" className="btn btn-primary"> <FontAwesomeIcon icon={faArrowAltCircleRight} color="red" size="xs" /> </button> </div> </form> <span className="bottom" onClick={() => { setRegistrationModal(true) setForgetModal(false); }}> Join Us </span> {errors.email && <p>{errors.email.message}</p>} </div> {showRegistrationModal ? ( <Model title="Singup" onCancel={() => setRegistrationModal(false)}> <RegistrationForm onOK={handleOK} /> </Model> ) : ( showForgetModal && ( <Model title="Forget Password" onCancel={() => setForgetModal(false)}> <ForgetPassword /> </Model> ) )} </> ); }; export default Login;
  25. please avoid this to use and try to use DI (Dependency Injection)
×
×
  • Create New...