File: D:/HostingSpaces/SBogers10/zipwire.komma.pro/app/KommaApp/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\KommaApp\Shop\Categories\Models\Category;
$prefix = '';
$factory->define(Category::class, function (Faker\Generator $faker) use ($prefix) {
if(!in_array(\App\KommaApp\Shop\Factories\Fakers\ProductCategoriesFaker::class, $faker->getProviders())) $faker->addProvider(\App\KommaApp\Shop\Factories\Fakers\ProductCategoriesFaker::class);
return [
'code_name' => $prefix.$faker->productCategory(),
'site_id' => 1,
'active' => 1,
'created_at' => \Carbon\Carbon::now()->toDateTimeString(),
'updated_at' => \Carbon\Carbon::now()->toDateTimeString()
];
});