Issues (232)

app/Request.php (1 issue)

1
<?php
2
3
namespace App;
4
5
use Illuminate\Database\Eloquent\Model;
6
use OwenIt\Auditing\AuditingTrait;
7
use OwenIt\Auditing\Contracts\Auditable;
8
9
class Request extends Model implements Auditable
10
{
11
    use \OwenIt\Auditing\Auditable;
0 ignored issues
show
The trait OwenIt\Auditing\Auditable requires some properties which are not provided by App\Request: $auditInclude, $auditThreshold, $auditDriver, $auditable_type, $auditable_id, $auditStrict, $auditTimestamps, $auditExclude, $auditEvents, $attributeModifiers
Loading history...
12
    public $timestamps = true;
13
    protected $table = 'request';
14
    protected $fillable = [
15
        'user_id',
16
        'object_type',
17
        'object_id',
18
        'used',
19
    ];
20
21
    public function object()
22
    {
23
        return $this->morphTo();
24
    }
25
26
27
    public function consume()
28
    {
29
        // Consume the request
30
31
        $this->update(['used' => 1]);
32
    }
33
34
}
35