ok

Mini Shell

Direktori : /home2/selectio/www/fms-worksuite/app/Observers/
Upload File :
Current File : //home2/selectio/www/fms-worksuite/app/Observers/ProjectTimelogBreakObserver.php

<?php

namespace App\Observers;

use App\Models\ProjectTimeLogBreak;

class ProjectTimelogBreakObserver
{

    public function saving(ProjectTimeLogBreak $projectTimeLogBreak)
    {
        if (!isRunningInConsoleOrSeeding() && user()) {
            $projectTimeLogBreak->last_updated_by = user()->id;
        }
    }

    public function creating(ProjectTimeLogBreak $projectTimeLogBreak)
    {
        if (!isRunningInConsoleOrSeeding() && user()) {
            $projectTimeLogBreak->added_by = user()->id;
        }

        if (company()) {
            $projectTimeLogBreak->company_id = company()->id;
        }
    }

}

Zerion Mini Shell 1.0