Skip to content

Instantly share code, notes, and snippets.

@anishdcruz
Last active April 7, 2018 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anishdcruz/8f1fffcaca96d4af8f457fbfe528b602 to your computer and use it in GitHub Desktop.
Save anishdcruz/8f1fffcaca96d4af8f457fbfe528b602 to your computer and use it in GitHub Desktop.
Replacement for Apex app/Providers/AppServiceProvider.php
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use App\Support\CustomValidators;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
// or just copy the below line
\Schema::defaultStringLength(191);
$this->app->validator->resolver(function($translator, $data, $rules, $messages)
{
return new CustomValidators($translator, $data, $rules, $messages);
});
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment