Custom
Hello i got a user basic user table from laravel and admin user of twill
i want to add crud for the normal user in the twill dashboard but still keep the twill admin user alonside it
i try to transform the basic laravel module in one of a module i created a User controller in the Controller/Twill but the routing redirect me to the twill user module
10 Replies
Hi @magius did you check this guide? https://twillcms.com/guides/manage_frontend_user_profiles_from_twill.html
yeah but dont want to add the profile overhead it just add a step
i am more near a workable solution now
i renamed the absic laravel user table to account and tried to transform it to account module for a account module
Alright, then you can call your twill module something like AppUsers, and in the repository you use your user model instead of a twill generated model
or rename the entire thing yeah, probably easier
its okay my account controller display can display now. But i needed to add a deleted_at column for the soft_delete.
the data arent displaying normally and i cant seem to find the prob when i compare to other module
Do you have a title column? If not you can use
$this->setTitleColumnKey('your-column')
inside setUpController
yeh it worked for the name
thx
now the next step:
- its how to display the plain password and not the hashed version from the Bdd
- and when i update this password and save he get hashed again before saving
Hashing is a one way process, you cannot get the password out of the hashed version. This would be a major security concern. You can certainly allow setting a new password from the CMS, but not display it in clear text.
imagine if every company could get your passwords out of their database. We hash passwords before saving them so that it just isn't possible.
so for hashing should i use the beforeSave with the repositiory?
or their is something i can put on the
Yes, beforeSave, or a model setter