mirror of
https://github.com/koel/koel
synced 2024-12-24 11:33:05 +00:00
36 lines
790 B
PHP
36 lines
790 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Support\Facades\Validator;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Bootstrap any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
// Fix utf8mb4-related error starting from Laravel 5.4
|
|
Schema::defaultStringLength(191);
|
|
|
|
// 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()
|
|
{
|
|
//
|
|
}
|
|
}
|