<?php

use Illuminate\Support\Facades\Route;

function module_exist($moduleName)
{
    try {
        return \Nwidart\Modules\Facades\Module::isEnabled($moduleName);
        return true;
    } catch (\Exception $e) {
        return false;
    }
}

function view_price($number)
{
    return number_format($number, 2, '.', ',');
}

function view_point($number)
{
    return number_format($number, 0, '.', ',');
}

function client_route($routeName)
{
    if (Route::has($routeName)) {
        return route($routeName);
    } else {
        return route('home');
    }
}
