HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/brameda/brameda.nl/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);
    }
}