Skip to content
Permalink
Browse files

Episode 15 Complete

  • Loading branch information...
JeffreyWay committed Jan 15, 2019
1 parent f504bdf commit 2192501f311626560eaf55362e55cde5542abb05
Showing with 8 additions and 1 deletion.
  1. +7 −0 app/Task.php
  2. +1 −1 app/User.php
@@ -13,6 +13,13 @@ class Task extends Model
*/
protected $guarded = [];
/**
* The relationships that should be touched on save.
*
* @var array
*/
protected $touches = ['project'];
/**
* Get the owning project.
*
@@ -37,6 +37,6 @@ class User extends Authenticatable
*/
public function projects()
{
return $this->hasMany(Project::class, 'owner_id');
return $this->hasMany(Project::class, 'owner_id')->latest('updated_at');
}
}

0 comments on commit 2192501

Please sign in to comment.
You can’t perform that action at this time.