mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-15 06:09:58 +08:00
use composer to load helpers
This commit is contained in:
parent
681a56a741
commit
1fa51927bb
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use View;
|
||||
use Validator;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
@ -14,9 +15,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
\View::addExtension('tpl', 'blade');
|
||||
|
||||
require_once BASE_DIR."/app/helpers.php";
|
||||
View::addExtension('tpl', 'blade');
|
||||
|
||||
Validator::extend('username', function($attribute, $value, $parameters, $validator) {
|
||||
return preg_match("/^([A-Za-z0-9\x{4e00}-\x{9fa5}_]+)$/u", $value);
|
||||
|
@ -23,7 +23,10 @@
|
||||
],
|
||||
"psr-4": {
|
||||
"App\\": "app/"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"app/helpers.php"
|
||||
]
|
||||
},
|
||||
"autoload-dev": {
|
||||
"classmap": [
|
||||
|
Loading…
Reference in New Issue
Block a user