File: D:/HostingSpaces/SBogers10/shop.komma.nl/database/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\Categories\Models\Category;
$prefix = '';
$factory->define(Category::class, function (Faker\Generator $faker) use ($prefix) {
// if(!in_array(ProductCategoriesFaker::class, $faker->getProviders())) $faker->addProvider(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()
];
});