Static_worker.php 553 Bytes
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Static_worker extends Model
{
    use HasFactory;

    protected $fillable = [
        'user_id',
        'lookin',
        'year_month',
        'message',
        'old_lookin',
        'old_message'
    ];

    /*
   * Связь таблицы users с таблицей static_workers
   многие-к-одному
  */
    public function users() {
        return $this->belongsTo(User::class, 'user_id');
    }

}