Skip to content
Permalink
Browse files

Episode 24 Complete

  • Loading branch information...
JeffreyWay committed Feb 4, 2019
1 parent 8ffd0a9 commit c2bc7499a4cbca265ed393f456f0752c623dfb02
@@ -71,6 +71,6 @@ public function recordActivity($description)
*/
public function activity()
{
return $this->hasMany(Activity::class);
return $this->hasMany(Activity::class)->latest();
}
}
@@ -0,0 +1,10 @@
<div class="card mt-3">
<ul class="text-xs list-reset">
@foreach ($project->activity as $activity)
<li class="{{ $loop->last ? '' : 'mb-1' }}">
@include ("projects.activity.{$activity->description}")
<span class="text-grey">{{ $activity->created_at->diffForHumans(null, true) }}</span>
</li>
@endforeach
</ul>
</div>
@@ -0,0 +1 @@
You completed a task
@@ -0,0 +1 @@
You created the project
@@ -0,0 +1 @@
You created a task
@@ -0,0 +1 @@
You updated the project
@@ -66,9 +66,8 @@ class="card w-full mb-4"

<div class="lg:w-1/4 px-3 lg:py-8">
@include ('projects.card')
@include ('projects.activity.card')
</div>
</div>
</main>


@endsection

0 comments on commit c2bc749

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