Commit 659e5d75 by 杨树贤

通过composer添加自定义全局帮助函数

parent 297a9286
<?php
\ No newline at end of file
......@@ -26,7 +26,10 @@
],
"psr-4": {
"App\\": "app/"
}
},
"files": [
"app/helpers.php"
]
},
"autoload-dev": {
"psr-4": {
......
......@@ -15,6 +15,7 @@ Route::group(['middleware' => 'web'], function () {
Route::get('/', 'WebController@Entrance');
Route::get('/xxx', 'WebController@Entrance');
Route::get('/web/index', 'WebController@Entrance');
Route::get('/integrals', 'WebController@Entrance');
Route::match(['get', 'post'],'/goods/{key}', 'GoodsWebController@Entrance');
Route::match(['get', 'post'],'/goods/api/{key}', 'GoodsApiController@Entrance');
Route::match(['get', 'post'],'/api/{key}', 'ApiController@Entrance');
......@@ -23,3 +24,7 @@ Route::group(['middleware' => 'web'], function () {
Route::match(['get', 'post'],'/offer/{key}', 'OfferWebController@Entrance');
Route::match(['get', 'post'],'/offer/api/{key}', 'OfferApiController@Entrance');
});
Route::get('/time', function () {
return time();
});
\ No newline at end of file
......@@ -279,7 +279,7 @@ class ClassLoader
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
}
/**
......
......@@ -16,7 +16,10 @@ return array(
'App\\Http\\Controllers\\Controller' => $baseDir . '/app/Http/Controllers/Controller.php',
'App\\Http\\Controllers\\GoodsApiController' => $baseDir . '/app/Http/Controllers/GoodsApiController.php',
'App\\Http\\Controllers\\GoodsWebController' => $baseDir . '/app/Http/Controllers/GoodsWebController.php',
'App\\Http\\Controllers\\InquiryApiController' => $baseDir . '/app/Http/Controllers/InquiryApiController.php',
'App\\Http\\Controllers\\InquiryWebController' => $baseDir . '/app/Http/Controllers/InquiryWebController.php',
'App\\Http\\Controllers\\OfferApiController' => $baseDir . '/app/Http/Controllers/OfferApiController.php',
'App\\Http\\Controllers\\OfferWebController' => $baseDir . '/app/Http/Controllers/OfferWebController.php',
'App\\Http\\Controllers\\WebController' => $baseDir . '/app/Http/Controllers/WebController.php',
'App\\Http\\Kernel' => $baseDir . '/app/Http/Kernel.php',
'App\\Http\\Middleware\\CheckLogin' => $baseDir . '/app/Http/Middleware/CheckLogin.php',
......@@ -27,6 +30,7 @@ return array(
'App\\Http\\Middleware\\VerifyCsrfToken' => $baseDir . '/app/Http/Middleware/VerifyCsrfToken.php',
'App\\Model\\GoodsModel' => $baseDir . '/app/Model/GoodsModel.php',
'App\\Model\\RedisModel' => $baseDir . '/app/Model/RedisModel.php',
'App\\Model\\SkuViolation' => $baseDir . '/app/Model/SkuViolation.php',
'App\\Model\\UUIDModel' => $baseDir . '/app/Model/UUIDModel.php',
'App\\Providers\\AppServiceProvider' => $baseDir . '/app/Providers/AppServiceProvider.php',
'App\\Providers\\AuthServiceProvider' => $baseDir . '/app/Providers/AuthServiceProvider.php',
......@@ -34,6 +38,7 @@ return array(
'App\\Providers\\EventServiceProvider' => $baseDir . '/app/Providers/EventServiceProvider.php',
'App\\Providers\\RouteServiceProvider' => $baseDir . '/app/Providers/RouteServiceProvider.php',
'App\\User' => $baseDir . '/app/User.php',
'App\\model\\UserModel' => $baseDir . '/app/Model/UserModel.php',
'ArithmeticError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
'AssertionError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',
'Carbon\\Carbon' => $vendorDir . '/nesbot/carbon/src/Carbon/Carbon.php',
......
......@@ -18,4 +18,5 @@ return array(
'801c31d8ed748cfa537fa45402288c95' => $vendorDir . '/psy/psysh/src/functions.php',
'f0906e6318348a765ffb6eb24e0d0938' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/helpers.php',
'58571171fd5812e6e447dce228f52f4d' => $vendorDir . '/laravel/framework/src/Illuminate/Support/helpers.php',
'b4e3f29b106af37a2bb239f73cdf68c7' => $baseDir . '/app/helpers.php',
);
......@@ -19,6 +19,7 @@ class ComposerStaticInit0f2e3b599ee0093c705be10a8ac95745
'801c31d8ed748cfa537fa45402288c95' => __DIR__ . '/..' . '/psy/psysh/src/functions.php',
'f0906e6318348a765ffb6eb24e0d0938' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/helpers.php',
'58571171fd5812e6e447dce228f52f4d' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/helpers.php',
'b4e3f29b106af37a2bb239f73cdf68c7' => __DIR__ . '/../..' . '/app/helpers.php',
);
public static $prefixLengthsPsr4 = array (
......@@ -357,7 +358,10 @@ class ComposerStaticInit0f2e3b599ee0093c705be10a8ac95745
'App\\Http\\Controllers\\Controller' => __DIR__ . '/../..' . '/app/Http/Controllers/Controller.php',
'App\\Http\\Controllers\\GoodsApiController' => __DIR__ . '/../..' . '/app/Http/Controllers/GoodsApiController.php',
'App\\Http\\Controllers\\GoodsWebController' => __DIR__ . '/../..' . '/app/Http/Controllers/GoodsWebController.php',
'App\\Http\\Controllers\\InquiryApiController' => __DIR__ . '/../..' . '/app/Http/Controllers/InquiryApiController.php',
'App\\Http\\Controllers\\InquiryWebController' => __DIR__ . '/../..' . '/app/Http/Controllers/InquiryWebController.php',
'App\\Http\\Controllers\\OfferApiController' => __DIR__ . '/../..' . '/app/Http/Controllers/OfferApiController.php',
'App\\Http\\Controllers\\OfferWebController' => __DIR__ . '/../..' . '/app/Http/Controllers/OfferWebController.php',
'App\\Http\\Controllers\\WebController' => __DIR__ . '/../..' . '/app/Http/Controllers/WebController.php',
'App\\Http\\Kernel' => __DIR__ . '/../..' . '/app/Http/Kernel.php',
'App\\Http\\Middleware\\CheckLogin' => __DIR__ . '/../..' . '/app/Http/Middleware/CheckLogin.php',
......@@ -368,6 +372,7 @@ class ComposerStaticInit0f2e3b599ee0093c705be10a8ac95745
'App\\Http\\Middleware\\VerifyCsrfToken' => __DIR__ . '/../..' . '/app/Http/Middleware/VerifyCsrfToken.php',
'App\\Model\\GoodsModel' => __DIR__ . '/../..' . '/app/Model/GoodsModel.php',
'App\\Model\\RedisModel' => __DIR__ . '/../..' . '/app/Model/RedisModel.php',
'App\\Model\\SkuViolation' => __DIR__ . '/../..' . '/app/Model/SkuViolation.php',
'App\\Model\\UUIDModel' => __DIR__ . '/../..' . '/app/Model/UUIDModel.php',
'App\\Providers\\AppServiceProvider' => __DIR__ . '/../..' . '/app/Providers/AppServiceProvider.php',
'App\\Providers\\AuthServiceProvider' => __DIR__ . '/../..' . '/app/Providers/AuthServiceProvider.php',
......@@ -375,6 +380,7 @@ class ComposerStaticInit0f2e3b599ee0093c705be10a8ac95745
'App\\Providers\\EventServiceProvider' => __DIR__ . '/../..' . '/app/Providers/EventServiceProvider.php',
'App\\Providers\\RouteServiceProvider' => __DIR__ . '/../..' . '/app/Providers/RouteServiceProvider.php',
'App\\User' => __DIR__ . '/../..' . '/app/User.php',
'App\\model\\UserModel' => __DIR__ . '/../..' . '/app/Model/UserModel.php',
'ArithmeticError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
'AssertionError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',
'Carbon\\Carbon' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Carbon.php',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment