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/Factories/CategoryFactories.php
<?php
/*
|--------------------------------------------------------------------------
| Product Factories
|--------------------------------------------------------------------------
|
| Here you may define all of your model factories.
| Model factories give
| you a convenient way to create models for testing and seeding your
| database. Just tell the factory how a default model should look.
*/


use App\Komma\Shop\Categories\Models\Category;

$prefix = '';

$factory->define(Category::class, function (Faker\Generator $faker) use ($prefix) {
    if(!in_array(\App\Komma\Shop\Factories\Fakers\ProductCategoriesFaker::class, $faker->getProviders())) $faker->addProvider(\App\Komma\Shop\Factories\Fakers\ProductCategoriesFaker::class);

    return [
        'code_name' => $prefix.$faker->productCategory(),
        'site_id' => null,
        'active' => 1,
        'created_at' => \Carbon\Carbon::now()->toDateTimeString(),
        'updated_at' => \Carbon\Carbon::now()->toDateTimeString()
    ];
});