Вход Регистрация
Файл: app/Models/Error.php
Строк: 36
<?php

declare(strict_types=1);

namespace 
AppModels;

use 
CarbonCarbonImmutable;
use 
IlluminateDatabaseEloquentModel;
use 
IlluminateDatabaseEloquentRelationsBelongsTo;

/**
 * Class Error
 *
 * @property int             $id
 * @property int             $code
 * @property string          $request
 * @property string          $referer
 * @property int             $user_id
 * @property string          $message
 * @property string          $ip
 * @property string          $brow
 * @property CarbonImmutable $created_at
 */
class Error extends Model
{
    
/**
     * The name of the "updated at" column.
     */
    
public const ?string UPDATED_AT null;

    
/**
     * The attributes that aren't mass assignable.
     */
    
protected $guarded = [];

    
/**
     * Get the attributes that should be cast.
     */
    
protected function casts(): array
    {
        return [
            
'user_id' => 'int',
        ];
    }

    
/**
     * Возвращает связь пользователя
     */
    
public function user(): BelongsTo
    
{
        return 
$this->belongsTo(User::class, 'user_id')->withDefault();
    }
}
Онлайн: 1
Реклама