N
N
Nikita Dergachov2017-08-15 18:11:24
Laravel
Nikita Dergachov, 2017-08-15 18:11:24

How to disable update fields in laravel?

Good afternoon, there is a model containing: name, count, and so on.
The query is running:
$model->update($request->input());
How to exclude the count field from editing?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2017-08-15
@Sanasol

The model has fillable/guarded , which prohibits/allows filling in bulk fields.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question