koel/app/Providers/AppServiceProvider.php
2015-12-13 12:42:28 +08:00

32 lines
646 B
PHP

<?php
namespace App\Providers;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
// Add some custom validation rules
Validator::extend('valid_path', function($attribute, $value, $parameters, $validator) {
return (is_dir($value) && is_readable($value));
});
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
}