mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 05:32:39 +01:00
30 lines
436 B
PHP
30 lines
436 B
PHP
<?php
|
|
|
|
namespace App\Utils\Traits;
|
|
|
|
|
|
/**
|
|
* Class UserSessionAttributes
|
|
* @package App\Utils\Traits
|
|
*/
|
|
trait UserSessionAttributes
|
|
{
|
|
|
|
/**
|
|
* @param $value
|
|
*/
|
|
public function setCurrentCompanyId($value) : void
|
|
{
|
|
session(['current_company_id' => $value]);
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getCurrentCompanyId() : int
|
|
{
|
|
return session('current_company_id');
|
|
}
|
|
|
|
}
|