3.3 - Refusing Orders When There Are No More Tickets

This commit is contained in:
Adam Wathan
2016-11-14 17:24:32 -05:00
parent 53a69777ea
commit 2ccc635f5f
4 changed files with 56 additions and 3 deletions

View File

@@ -6,5 +6,8 @@ use Illuminate\Database\Eloquent\Model;
class Ticket extends Model
{
//
public function scopeAvailable($query)
{
return $query->whereNull('order_id');
}
}