phpvms/app/Support/Utils.php
Nabeel S e862537a20
Split the importer module out from the installer module (#468)
* Split the importer module out from the installer module

* Cleanup of unused imports

* Move updater into separate module #453

* Remove unused imports/formatting

* Disable the install and importer modules at the end of the setup

* Unused imports; update IJ style

* test explicit stage for php+mysql

* add more to matrix

* Add different MariaDB versions

* undo
2019-12-12 15:07:35 -05:00

51 lines
963 B
PHP

<?php
namespace App\Support;
use Illuminate\Contracts\Container\BindingResolutionException;
use Nwidart\Modules\Facades\Module;
/**
* Global utilities
*/
class Utils
{
/**
* Enable the debug toolbar
*/
public static function enableDebugToolbar()
{
try {
app('debugbar')->enable();
} catch (BindingResolutionException $e) {
}
}
/**
* Disable the debug toolbar
*/
public static function disableDebugToolbar()
{
try {
app('debugbar')->disable();
} catch (BindingResolutionException $e) {
}
}
/**
* Is the installer enabled?
*
* @return bool
*/
public static function installerEnabled()
{
/** @var \Nwidart\Modules\Module $installer */
$installer = Module::find('installer');
if (!$installer) {
return false;
}
return $installer->isEnabled();
}
}