Support the ongoing development of Laravel.io →
posted 7 years ago
Last updated 2 years ago.
0

Because you have $guarded as an empty array you are saying that its ok to write the whole of the request data into the database.

csrf token _token is one of the fields in the $request and so an attempt is made to write it to the database.

options;

  1. Switch to $fillable array and just mention the fields you want to set
  2. update with request()->only('field1', 'field2') etc
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.