mirror of
https://github.com/koel/koel
synced 2024-12-01 08:19:18 +00:00
32 lines
645 B
PHP
32 lines
645 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('path.valid', function ($attribute, $value, $parameters, $validator) {
|
|
return is_dir($value) && is_readable($value);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Register any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
//
|
|
}
|
|
}
|