product submission

This commit is contained in:
2026-02-06 14:56:56 +02:00
parent b2fd2a5eac
commit 2e1ce0d93b
15 changed files with 1673 additions and 0 deletions
+70
View File
@@ -0,0 +1,70 @@
<?php
namespace Database\Seeders;
use App\Models\Category;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Str;
class CategorySeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$categories = [
[
'name' => 'Developer Tools',
'description' => 'Tools and services for developers',
],
[
'name' => 'Productivity',
'description' => 'Apps and tools to boost productivity',
],
[
'name' => 'Design',
'description' => 'Design tools and resources',
],
[
'name' => 'Marketing',
'description' => 'Marketing tools and platforms',
],
[
'name' => 'AI & Machine Learning',
'description' => 'AI-powered tools and services',
],
[
'name' => 'Analytics',
'description' => 'Data analytics and tracking tools',
],
[
'name' => 'Communication',
'description' => 'Communication and collaboration tools',
],
[
'name' => 'E-commerce',
'description' => 'E-commerce platforms and tools',
],
[
'name' => 'Education',
'description' => 'Educational tools and platforms',
],
[
'name' => 'Finance',
'description' => 'Financial services and tools',
],
];
foreach ($categories as $category) {
Category::create([
'name' => $category['name'],
'slug' => Str::slug($category['name']),
'description' => $category['description'],
]);
}
$this->command->info('Categories created successfully!');
}
}
+1
View File
@@ -17,6 +17,7 @@ class DatabaseSeeder extends Seeder
{
$this->call([
RoleSeeder::class,
CategorySeeder::class,
]);
// Uncomment to create additional users with factory