发布2.3测试版

This commit is contained in:
2021-05-02 05:55:42 +08:00
parent 8732c85312
commit ef8224d20e
83 changed files with 635 additions and 1361 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
require __DIR__.'/macros.php';
require __DIR__.'/sql.php';
View::composer('*', function ($view) {
$shared = View::getShared();
$licenseType = env('LICENSE_TYPE', '开源版');
$view->with('title', 'Gdoo');
$view->with('powered', 'Powered By Gdoo');
$view->with('version', '<a target="_blank" href="http://www.gdoo.net">Gdoo</a> '.$shared['version'].' '.$licenseType);
});
/*
* 判断是否为empty
*/
function not_empty($data)
{
return !empty($data);
}
/*
* 主动抛出异常
*/
function abort_error($message, $code = 200)
{
throw new App\Exceptions\AbortException($message, $code);
}