ok

Mini Shell

Direktori : /home2/selectio/public_html/fms-worksuite/app/Observers/
Upload File :
Current File : /home2/selectio/public_html/fms-worksuite/app/Observers/TaskFileObserver.php

<?php

namespace App\Observers;

use App\Helper\Files;
use App\Models\TaskFile;

class TaskFileObserver
{

    public function saving(TaskFile $file)
    {
        if (!isRunningInConsoleOrSeeding()) {
            $file->last_updated_by = user()->id;
        }
    }

    public function creating(TaskFile $file)
    {
        if (!isRunningInConsoleOrSeeding()) {
            $file->added_by = $file->user_id;
        }
    }

}

Zerion Mini Shell 1.0