fideloper / Implementing-Laravel

Companion application to the e-book Implementing Laravel
173 stars 40 forks source link

Update Article.php #22

Closed sdebacker closed 10 years ago

sdebacker commented 10 years ago

Added ->withTimestamps() to tags method (http://laravel.com/docs/eloquent#working-with-pivot-tables)

fideloper commented 10 years ago

Hey, thanks! I'm wondering why you added this?

sdebacker commented 10 years ago

Without this, all rows in pivot table has 0000-00-00 00:00:00 for created_at and updated_at. I thought it was better with correct values. Or remove timestamps() in migration file ?

fideloper commented 10 years ago

I just wasn't sure, I thought they came along without having to specify lol

Thanks again!