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

declare(strict_types=1);

namespace 
AppModels;

use 
IlluminateDatabaseEloquentModel;
use 
IlluminateDatabaseEloquentRelationsBelongsTo;

/**
 * Class Invite
 *
 * @property int id
 * @property string hash
 * @property int user_id
 * @property int invite_user_id
 * @property int used
 * @property int used_at
 * @property int created_at
 */
class Invite extends BaseModel
{
    
/**
     * The table associated with the model.
     *
     * @var string
     */
    
protected $table 'invite';

    
/**
     * Indicates if the model should be timestamped.
     */
    
public $timestamps false;

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

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