1 month ago

I have a request data but doesn't updated in my database

Posted 1 month ago by anonymouse703

Hello everyone newbee here... I used Laravel 7 and Vue JS.

I tried to update a record using vue js. When I log the request I have this data

[2020-09-23 04:32:47] local.INFO: array (
  'id' => 9,
  'name' => 'PS Bank',

but my update is not working... this is my controller

public function update(Request $request, MoneyTransfer $moneyTransfer)
        $this->validate($request, [
            'name' => 'required'
        $data = $moneyTransfer->update($request->all());

Do I need to include id in my fillable in the model? this is the model. protected $fillable = ['name'];

Thank you and God bless

Please sign in or create an account to participate in this conversation.