1
0
Fork 0
mirror of https://github.com/archtechx/airwire-demo.git synced 2025-12-12 08:34:03 +00:00

public release

This commit is contained in:
Samuel Štancl 2021-05-21 18:38:26 +02:00
commit d6d22f8355
115 changed files with 67218 additions and 0 deletions

25
app/Models/Report.php Normal file
View file

@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Report extends Model
{
use HasFactory;
public static function booted()
{
static::saving(function (self $report) {
// $report->status ??= collect(['pending', 'resolved', 'invalid'])->random();
$report->status ??= 'pending';
});
}
public function assignee(): BelongsTo
{
return $this->belongsTo(User::class);
}
}