<?php

namespace App\Service\Hrms;
use App\Models\Hrms\Organisation;
use Log;
use Auth;

class OrganisationService
{
    public function organisationCreate($request,$user){

        $data=[
            'company_name','no_of_employee',
        ];
        
        foreach ($data as $key => $value) {
            if(isset($request[$value]) && $request[$value]!=null && $request[$value]!=''){
                $obj[$value]=$request[$value];
            }
        }
        
        $obj['user_id']=$user['id'];
        $obj['organisation_id']=$user['organisation_id'];

        $organisation=Organisation::create($obj);

        return true;
        
    }


}