YandexError.php
615 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\SoftDeletes;
class YandexError extends Model
{
use SoftDeletes;
protected $table = 'yandex_errors';
protected $fillable = [
'token_id',
'cause_type',
'cause_id',
'service',
'method',
'params',
'errors',
];
protected $casts = [
'params' => 'json',
'errors' => 'array',
];
public function token()
{
return $this->belongsTo(Tokens::class, 'token_id');
}
public function cause()
{
return $this->morphTo('cause');
}
}