title: Password bcrypt not working laravel 5.3
body: <p>When i create a form password bcrypt working well but when i am going to edit and update password field it saves in simple text in database . Please help how to fix it.
  <strong>Store Function</strong></p>
  
  <pre><code>public function store(Request $request)
  {
  
      $mydata['name']                    = $request-&gt;input('name');
      $mydata['username']                = $request-&gt;input('username');
      $mydata['password']                = bcrypt($request-&gt;input('password'));
  
       $data = Data::create($mydata);
  
  
        session()-&gt;flash('msg', 'User successfully created');
       return redirect()-&gt;route('home.index');
  }
  </code></pre>
  
  <p><strong>Update Function</strong></p>
  
  <pre><code>public function update(Request $request, $id)
  {
  
      $data = Data::findOrFail($id);
      $input = $request-&gt;all();
      $data-&gt;fill($input)-&gt;save();
      session()-&gt;flash('msg',trans('User successfully Updated.'));
      return redirect()-&gt;route('home.index');
  }
  </code></pre>
  
  <p>I am using same form for create and update. create is working well but when i edit form and update the password saves in simple text how to bcrypt it before save.
  Please help i have defined update function above </p>