create crud product categories and partial update crud products with dealers stock

This commit is contained in:
2025-05-28 18:24:44 +07:00
parent 80375d8af3
commit 59e23ae535
28 changed files with 1336 additions and 28 deletions

View File

@@ -0,0 +1,39 @@
<?php
namespace Database\Seeders;
use App\Models\Menu;
use Illuminate\Database\Seeder;
class MenuSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$menus = [
[
'name' => 'Produk',
'link' => 'products.index'
],
[
'name' => 'Kategori Produk',
'link' => 'product_categories.index'
]
];
foreach ($menus as $menu){
Menu::updateOrInsert(
['link' => $menu['link']],
[
'name' => $menu['name'],
'created_at' => now(),
'updated_at' => now()
]
);
}
}
}