openclassify/addons/default/visiosoft/advs-module/src/Support/_helpers.php
Dia Shalabi 803b3c3d80
#2220 points module (rewrite the sms verification module) (#713)
* #2300 Mobile App Fixes

* #2245 Add points-module as payment method

* #2245 Add points-module as payment method

* #2220 points module

* #2220 points module (rewrite the sms verification module)

* #2312 [profile-module] Can't update profile detail

* #2220 points module

* #2220 points module (rewrite the sms verification module) !4

* remove command prompt
2020-10-14 11:52:03 +03:00

34 lines
863 B
PHP

<?php
use Illuminate\Contracts\Bus\Dispatcher;
use Visiosoft\AdvsModule\Adv\Command\appendRequestURL;
use Visiosoft\AdvsModule\Support\Command\CheckModuleInstalled;
use Visiosoft\AdvsModule\Support\Command\GetBuyables;
if (!function_exists('fullLink'))
{
function fullLink($request, $url, $newParameters = array()) {
return app(Dispatcher::class)->dispatch(new appendRequestURL($request, $url, $newParameters));
}
}
if (!function_exists('is_module_installed'))
{
function is_module_installed($moduleNamespace, $checkEnabled = true) {
return dispatch_now(new CheckModuleInstalled($moduleNamespace, $checkEnabled));
}
}
if (!function_exists('get_buyables'))
{
function get_buyables() {
return dispatch_now(new GetBuyables());
}
}
if (!function_exists('auth_id_if_null'))
{
function auth_id_if_null($userId) {
return $userId ?: auth()->id();
}
}