<?php

namespace App\Models\cms\Masters;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Auth;

class ContainerCondition extends Model
{
    //protected $table = 'master_container_condition';
    protected $fillable = [
        'name',
        'status',
    ];

    protected static function boot()
    {
        parent::boot();

        ContainerCondition::creating(function($model) {
            $user = Auth::user();
            if($user!=null)
              $model->entryby = $user->id;
            //$model->companyid = 1;
        });
    }
}
