120 - Creating Tickets at Time of Publish

This commit is contained in:
Adam Wathan
2017-07-04 11:02:04 -04:00
parent 7bd3702db3
commit a59e0e21a2
4 changed files with 10 additions and 2 deletions

View File

@@ -28,6 +28,7 @@ class Concert extends Model
public function publish()
{
$this->update(['published_at' => $this->freshTimestamp()]);
$this->addTickets($this->ticket_quantity);
}
public function getFormattedDateAttribute()