mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-02-02 07:47:38 +00:00
109 - Autopublishing New Concerts
This commit is contained in:
@@ -20,6 +20,16 @@ class Concert extends Model
|
||||
return $query->whereNotNull('published_at');
|
||||
}
|
||||
|
||||
public function isPublished()
|
||||
{
|
||||
return $this->published_at !== null;
|
||||
}
|
||||
|
||||
public function publish()
|
||||
{
|
||||
$this->update(['published_at' => $this->freshTimestamp()]);
|
||||
}
|
||||
|
||||
public function getFormattedDateAttribute()
|
||||
{
|
||||
return $this->date->format('F j, Y');
|
||||
|
||||
Reference in New Issue
Block a user