N
N
naneri2015-02-20 19:14:30
Laravel
naneri, 2015-02-20 19:14:30

Why can't I call the Parent method on a Laravel model?

There is such a method in the model:

class User extends Eloquent {
....
    public function save() {
        parent::save();
    }
...
}

For some reason, now when calling User-> save (); the data is no longer stored in the database. Why is that?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Brezhnev, 2015-02-20
@vanchelo

Попробуйте так

public function save(array $options = array()) {
    return parent::save($options);
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question