Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| Log | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Models; |
| 4 | |
| 5 | use App\LogLevelEnum; |
| 6 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
| 7 | use Illuminate\Database\Eloquent\Model; |
| 8 | use Illuminate\Support\Carbon; |
| 9 | |
| 10 | /** |
| 11 | * @method static create(array<string, mixed> $array) |
| 12 | * @property LogLevelEnum $level |
| 13 | * @property string $message |
| 14 | * @property array<string, mixed> $context |
| 15 | * @property Carbon $created_at |
| 16 | * @property Carbon $updated_at |
| 17 | */ |
| 18 | class Log extends Model |
| 19 | { |
| 20 | use HasFactory; |
| 21 | |
| 22 | protected $table = 'logs'; |
| 23 | |
| 24 | protected $fillable = [ |
| 25 | 'level', |
| 26 | 'message', |
| 27 | 'context', |
| 28 | ]; |
| 29 | |
| 30 | protected $casts = [ |
| 31 | 'level' => LogLevelEnum::class, |
| 32 | 'context' => 'array', |
| 33 | 'created_at' => 'datetime', |
| 34 | 'updated_at' => 'datetime', |
| 35 | ]; |
| 36 | } |