Skip to content

Instantly share code, notes, and snippets.

@yooouuri
Created June 2, 2017 09:13
Show Gist options
  • Select an option

  • Save yooouuri/8a499fc678bb82465e5eada31f52e998 to your computer and use it in GitHub Desktop.

Select an option

Save yooouuri/8a499fc678bb82465e5eada31f52e998 to your computer and use it in GitHub Desktop.
<?php
namespace App\Providers;
use Faker\Factory;
use Faker\Generator;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
//
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
$this->app->singleton(Generator::class, function () {
return Factory::create('nl_NL');
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment