mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-26 11:14:06 +00:00
21 lines
314 B
PHP
21 lines
314 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Ticket extends Model
|
|
{
|
|
protected $guarded = [];
|
|
|
|
public function scopeAvailable($query)
|
|
{
|
|
return $query->whereNull('order_id');
|
|
}
|
|
|
|
public function release()
|
|
{
|
|
$this->update(['order_id' => null]);
|
|
}
|
|
}
|