added source feature

This commit is contained in:
Denis Duliçi
2021-09-07 10:33:34 +03:00
parent 0a4e066451
commit c59c71b0f9
80 changed files with 475 additions and 63 deletions

View File

@ -2,6 +2,7 @@
use App\Models\Common\Company;
use App\Traits\DateTime;
use App\Traits\Sources;
use App\Utilities\Date;
use App\Utilities\Widgets;
@ -38,7 +39,7 @@ if (!function_exists('user_id')) {
if (!function_exists('company_date_format')) {
/**
* Format the given date based on company settings.
* Get the date format of company.
*
* @return string
*/
@ -127,13 +128,30 @@ if (!function_exists('should_queue')) {
}
}
if (!function_exists('source_name')) {
/**
* Get the current source.
*
* @return string
*/
function source_name()
{
$tmp = new class() {
use Sources;
};
return $tmp->getSourceName();
}
}
if (!function_exists('cache_prefix')) {
/**
* Cache system added company_id prefix.
*
* @return string
*/
function cache_prefix() {
function cache_prefix()
{
return company_id() . '_';
}
}