mirror of
https://github.com/flarum/framework.git
synced 2024-12-01 14:20:47 +08:00
Add method for checking debug mode
This commit is contained in:
parent
efccf8bb7d
commit
74536d7162
|
@ -1,7 +1,5 @@
|
||||||
<?php namespace Flarum;
|
<?php namespace Flarum;
|
||||||
|
|
||||||
use DB;
|
|
||||||
|
|
||||||
class Core
|
class Core
|
||||||
{
|
{
|
||||||
public static function isInstalled()
|
public static function isInstalled()
|
||||||
|
@ -9,6 +7,11 @@ class Core
|
||||||
return file_exists(base_path('../config.php'));
|
return file_exists(base_path('../config.php'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function inDebugMode()
|
||||||
|
{
|
||||||
|
return env('APP_DEBUG');
|
||||||
|
}
|
||||||
|
|
||||||
public static function config($key, $default = null)
|
public static function config($key, $default = null)
|
||||||
{
|
{
|
||||||
if (! static::isInstalled()) {
|
if (! static::isInstalled()) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user