Skip to content

Commit

Permalink
Merge pull request #8 from Laralum/analysis-qvkkKV
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
24aitor authored Jun 5, 2017
2 parents eac4df9 + ee9d89e commit 7113bfc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Traits/Events.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@

use Laralum\Events\Models\Event;

trait Events {
public function joinedEvents() {
trait Events
{
public function joinedEvents()
{
return $this->belongsToMany(Event::class, 'laralum_event_user')->withPivot('responsible');
}

public function responsibleEvents () {
public function responsibleEvents()
{
return $this->joinedEvents()->wherePivot('responsible', true)->get();
}
}

0 comments on commit 7113bfc

Please sign in to comment.