代碼: 選擇全部
$form->saving(function (Form $form) {
if (substr(url()->previous(), -6) == 'create');{
$form->key_user = Admin::user()->id;
}
$form->mod_user = Admin::user()->id;
//$form->password = bcrypt( $form->password );
});
代碼: 選擇全部
public function setPassWordAttribute($value)
{
$this->attributes['password'] = \Hash::make($value);
}