File: D:/HostingSpaces/SBogers10/veltech.komma.pro/app/Komma/Shop/Tests/Traits/withFaker.php
<?php
namespace App\Komma\Shop\Tests\Traits;
use Faker\Generator;
use Illuminate\Foundation\Testing\WithFaker as OriginalFaker;
/**
* Trait WithFaker
*
* Allows the trait users to use the modified Generator from the kmsFakerServiceProvider
* That one has additional providers
*
* @package App\Komma\Shop\Tests\Traits
*/
trait WithFaker
{
use OriginalFaker; //This WithFaker extends the Original faker this way
/**
* Create a Faker instance for the given locale.
*
* @param string $locale
* @return \Faker\Generator
*/
protected function makeFaker($locale = null)
{
return app(Generator::class);
}
}