108 - Connecting Promoters and Concerts

This commit is contained in:
Adam Wathan
2017-05-23 10:28:00 -04:00
parent 68a1d94540
commit fc6389ca01
6 changed files with 25 additions and 4 deletions

View File

@@ -10,6 +10,11 @@ class Concert extends Model
protected $guarded = [];
protected $dates = ['date'];
public function user()
{
return $this->belongsTo(User::class);
}
public function scopePublished($query)
{
return $query->whereNotNull('published_at');