Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$model->update() doesn't appear to work. #62

Closed
trea opened this issue Oct 30, 2013 · 1 comment
Closed

$model->update() doesn't appear to work. #62

trea opened this issue Oct 30, 2013 · 1 comment

Comments

@trea
Copy link

trea commented Oct 30, 2013

Hey there,

One issue I've stumbled upon is Eloquent's $model->update() not working properly. I verify this by using DB::getQueryLog() method to dump out queries. If a property is save via

$model->property = "blah";
$model->save();

it works great. But if it's done like so:

$post = Post::where('id', $id)->get()->first();
$post->update(Input::except('_id'));

It only ever runs the query to find the model.

Perhaps I'm missing something here?

Thanks,
Trea

jenssegers added a commit that referenced this issue Oct 31, 2013
@jenssegers
Copy link
Contributor

I added a test for this but did not see any errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants