39 lines
922 B
PHP
39 lines
922 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use App\CustomValidator;
|
|
use Validator;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Bootstrap any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
Validator::resolver(function ($translator, $data, $rules, $messages) {
|
|
return new CustomValidator($translator, $data, $rules, $messages);
|
|
});
|
|
|
|
// TODO(compat): This limits strings to 191 characters for older MySQL
|
|
// utf8mb4 index limits. Remove once every supported database handles
|
|
// indexed 255-character utf8mb4 strings; verify fresh migrations first.
|
|
Schema::defaultStringLength(191);
|
|
}
|
|
|
|
/**
|
|
* Register any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
//
|
|
}
|
|
}
|