diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/.DS_Store differ diff --git a/app/Enums/Product/ProductTypeEnums.php b/app/Enums/Product/ProductTypeEnums.php new file mode 100644 index 0000000..0f99c6b --- /dev/null +++ b/app/Enums/Product/ProductTypeEnums.php @@ -0,0 +1,40 @@ + 'VPS', + self::HOSTING => 'Hosting', + self::CLOUD => 'Cloud', + self::EMAIL => 'Email', + self::SSL => 'SSL', + self::DOMAIN => 'Domain', + self::WEB_DESIGN => 'Web Design', + }; + } + + public function color(): string + { + return match ($this) { + self::VPS => 'blue', + self::HOSTING => 'green', + self::CLOUD => 'cyan', + self::EMAIL => 'yellow', + self::SSL => 'teal', + self::DOMAIN => 'purple', + self::WEB_DESIGN => 'pink', + }; + } +} \ No newline at end of file diff --git a/app/Models/Product.php b/app/Models/Product.php new file mode 100644 index 0000000..af9d9fc --- /dev/null +++ b/app/Models/Product.php @@ -0,0 +1,32 @@ +getUuidColumns() as $column) { + if (empty($model->{$column})) { + $model->{$column} = (string) Str::uuid(); + } + } + }); + } + + public function getUuidColumns(): array + { + return property_exists($this, 'uuidColumns') + ? $this->uuidColumns + : ['uuid']; + } +} diff --git a/composer.json b/composer.json index 050c650..ca902d3 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,8 @@ "phpseclib/phpseclib": "*", "predis/predis": "^2.2", "pusher/pusher-php-server": "^7.2", - "spatie/laravel-permission": "^6.3" + "spatie/laravel-permission": "^6.3", + "spatie/laravel-sluggable": "^3.7" }, "require-dev": { "barryvdh/laravel-debugbar": "^3.9", diff --git a/composer.lock b/composer.lock index bfd2bfb..49d0d05 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0b3914c4b479edcf81cb2cd819d1c9d3", + "content-hash": "a4ed13c579256bd24083c5fc523b2c94", "packages": [ { "name": "aws/aws-crt-php", @@ -6573,6 +6573,65 @@ ], "time": "2025-06-05T07:33:07+00:00" }, + { + "name": "spatie/laravel-sluggable", + "version": "3.7.5", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-sluggable.git", + "reference": "e4fdd519e043a2af02b52eec2c3be2dd2e262e27" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-sluggable/zipball/e4fdd519e043a2af02b52eec2c3be2dd2e262e27", + "reference": "e4fdd519e043a2af02b52eec2c3be2dd2e262e27", + "shasum": "" + }, + "require": { + "illuminate/database": "^8.0|^9.0|^10.0|^11.0|^12.0", + "illuminate/support": "^8.0|^9.0|^10.0|^11.0|^12.0", + "php": "^8.0" + }, + "require-dev": { + "orchestra/testbench": "^6.23|^7.0|^8.0|^9.0|^10.0", + "pestphp/pest": "^1.20|^2.0|^3.7", + "spatie/laravel-translatable": "^5.0|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\Sluggable\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Generate slugs when saving Eloquent models", + "homepage": "https://github.com/spatie/laravel-sluggable", + "keywords": [ + "laravel-sluggable", + "spatie" + ], + "support": { + "source": "https://github.com/spatie/laravel-sluggable/tree/3.7.5" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2025-04-24T09:21:00+00:00" + }, { "name": "symfony/console", "version": "v6.4.22", diff --git a/config/sidebar.php b/config/sidebar.php new file mode 100644 index 0000000..37265c6 --- /dev/null +++ b/config/sidebar.php @@ -0,0 +1,234 @@ + 'Package vCenter', + 'icon' => 'fas fa-cubes', + 'children' => [ + [ + 'title' => 'Datacenter', + 'route' => 'package.datacenter.index', + 'icon' => 'fas fa-database', + ], + [ + 'title' => 'Host', + 'route' => 'package.host.index', + 'icon' => 'fas fa-street-view', + ], + [ + 'title' => 'Datastore', + 'route' => 'package.datastore.index', + 'icon' => 'fas fa-hdd', + ], + [ + 'title' => 'Folder', + 'route' => 'package.folder.index', + 'icon' => 'far fa-folder', + ], + [ + 'title' => 'Network Adapter', + 'route' => 'package.network.index', + 'icon' => 'fas fa-network-wired', + ], + [ + 'title' => 'Group Os', + 'route' => 'package.group.index', + 'icon' => 'fas fa-layer-group', + ], + [ + 'title' => 'Os Version', + 'route' => 'package.version.index', + 'icon' => 'fas fa-code-branch', + ], + [ + 'title' => 'IP Mapping', + 'route' => 'package.ipaddress.index', + 'icon' => 'fas fa-map-marker-alt', + ], + [ + 'title' => 'Location', + 'route' => 'package.datastore.index', + 'icon' => 'fas fa-hdd', + ], + ], + ], + [ + 'title' => 'Module', + 'icon' => 'fas fa-tools', + 'children' => [ + [ + 'title' => 'Module DNS', + 'route' => 'module.dns.index', + 'icon' => 'fas fa-globe', + ], + [ + 'title' => 'Module Hosting', + 'route' => 'module.hosting.index', + 'icon' => 'fas fa-server', + ], + [ + 'title' => 'Module vCenter', + 'route' => 'module.vcenter.index', + 'icon' => 'fas fa-desktop', + ], + [ + 'title' => 'Module IP Pool', + 'route' => 'module.ippool.index', + 'icon' => 'fas fa-network-wired', + ], + ], + ], + [ + 'title' => 'Manager Admin', + 'icon' => 'fas fa-users-cog', + 'children' => [ + [ + 'title' => 'List Admin', + 'route' => 'admin.user.index', + 'icon' => 'fas fa-users', + ], + [ + 'title' => 'Administrator Roles', + 'route' => 'role.index', + 'icon' => 'fas fa-user-tag', + ], + ], + ], + [ + 'title' => 'Client', + 'icon' => 'fas fa-users', + 'children' => [ + [ + 'title' => 'View All Client', + 'route' => 'customer.index', + 'icon' => 'fas fa-user-friends', + ], + [ + 'title' => 'Add new Client', + 'route' => 'customer.create', + 'icon' => 'fas fa-user-plus', + ], + ], + ], + [ + 'title' => 'Product', + 'icon' => 'fab fa-aws', + 'children' => [ + [ + 'title' => 'All Product/Services', + 'route' => 'product.index', + 'icon' => 'fas fa-list', + ], + [ + 'title' => 'Product Addon', + 'route' => 'addon.index', + 'icon' => 'fas fa-puzzle-piece', + ], + [ + 'title' => 'Domain Pricing', + 'route' => 'domain.index', + 'icon' => 'fas fa-globe-europe', + ], + ], + ], + [ + 'title' => 'Orders', + 'icon' => 'fas fa-store', + 'children' => [ + [ + 'title' => 'View All Orders', + 'route' => 'admin.order.index', + 'icon' => 'fas fa-shopping-cart', + ], + [ + 'title' => 'Pending Orders', + 'route' => 'admin.order.index', + 'params' => ['status' => 'pending'], + 'icon' => 'fas fa-shopping-cart', + ], + [ + 'title' => 'Processing Orders', + 'route' => 'admin.order.index', + 'params' => ['status' => 'processing'], + 'icon' => 'fas fa-cogs', + ], + [ + 'title' => 'Active Orders', + 'route' => 'admin.order.index', + 'params' => ['status' => 'active'], + 'icon' => 'fas fa-shopping-cart', + ], + [ + 'title' => 'Cancel Orders', + 'route' => 'admin.order.index', + 'params' => ['status' => 'cancel'], + 'icon' => 'fas fa-shopping-cart', + ], + [ + 'title' => 'Add New Orders', + 'route' => 'admin.order.create', + 'icon' => 'fas fa-cart-plus', + ], + ], + ], + [ + 'title' => 'Invoices', + 'icon' => 'fas fa-file-invoice', + 'children' => [ + [ + 'title' => 'View All Invoice', + 'route' => 'admin.invoice.index', + 'icon' => 'fas fa-file-invoice', + ], + [ + 'title' => 'Pending Invoice', + 'route' => 'admin.invoice.index', + 'params' => ['status' => 'unpaid'], + 'icon' => 'fas fa-file-invoice', + ], + [ + 'title' => 'Paid Invoice', + 'route' => 'admin.invoice.index', + 'params' => ['status' => 'active'], + 'icon' => 'fas fa-file-invoice', + ], + [ + 'title' => 'Cancel Invoice', + 'route' => 'admin.invoice.index', + 'params' => ['status' => 'cancel'], + 'icon' => 'fas fa-file-invoice', + ], + ], + ], + [ + 'title' => 'Menus', + 'icon' => 'fas fa-folder', + 'children' => [ + [ + 'title' => 'View All Menu', + 'route' => 'menu.index', + 'icon' => 'fas fa-file-invoice', + ], + ], + ], + [ + 'title' => 'Coupon', + 'route' => 'coupon.index', + 'icon' => 'fas fa-tags', + ], + [ + 'title' => 'Posts', + 'route' => 'post.index', + 'icon' => 'fas fa-blog', + ], + [ + 'title' => 'Support', + 'route' => 'support.index', + 'icon' => 'fas fa-ticket-alt', + ], + [ + 'title' => 'Payment Method', + 'route' => 'payment.index', + 'icon' => 'far fa-credit-card', + ], +]; \ No newline at end of file diff --git a/database/.DS_Store b/database/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/database/.DS_Store differ diff --git a/database/migrations/2026_01_27_172907_create_products_table.php b/database/migrations/2026_01_27_172907_create_products_table.php new file mode 100644 index 0000000..d45d146 --- /dev/null +++ b/database/migrations/2026_01_27_172907_create_products_table.php @@ -0,0 +1,59 @@ +id(); + $table->uuid('uuid')->unique(); + + // Product type + $table->string('product_type', 50)->index(); + + // Basic info + $table->string('name'); + $table->string('slug')->unique(); + $table->string('short_description')->nullable(); + $table->text('description')->nullable(); + + // Pricing + $table->decimal('price', 12, 2)->nullable(); + $table->decimal('price_sale', 12, 2)->nullable(); + $table->decimal('setup_fee', 12, 2)->default(0); + $table->string('currency', 10)->default('USD'); + $table->string('billing_cycle')->default('monthly'); + + // Trial / stock + $table->unsignedInteger('trial_days')->default(0); + $table->integer('stock')->nullable(); + $table->boolean('is_unlimited')->default(true); + + // Hardware specs (VPS) + $table->string('cpu')->nullable(); + $table->string('ram')->nullable(); + $table->string('gpu')->nullable(); + $table->string('disk')->nullable(); + $table->string('bandwidth')->nullable(); + + // Extra + $table->json('features')->nullable(); + $table->json('metadata')->nullable(); + + $table->boolean('is_active')->default(true); + $table->integer('sort_order')->default(0); + $table->timestamp('published_at')->nullable(); + + $table->timestamps(); + }); + + } + + public function down(): void + { + Schema::dropIfExists('products'); + } +}; diff --git a/database/migrations/2026_01_29_120313_create_virtual_machines_table.php b/database/migrations/2026_01_29_120313_create_virtual_machines_table.php new file mode 100644 index 0000000..78a3f5a --- /dev/null +++ b/database/migrations/2026_01_29_120313_create_virtual_machines_table.php @@ -0,0 +1,38 @@ +id(); + $table->uuid('uuid')->unique(); + + $table->string('vm_id')->unique(); + $table->string('name'); + $table->boolean('is_template')->default(false); + // Specs snapshot + $table->integer('cpu')->nullable(); + $table->integer('ram_mb')->nullable(); + $table->integer('disk_gb')->nullable(); + // Mapping + $table->foreignId('datacenter_id')->constrained('module_datacenter')->nullable(); + $table->foreignId('host_id')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('virtual_machines'); + } +}; diff --git a/database/migrations/2026_01_29_120327_create_product_v_m_templates_table.php b/database/migrations/2026_01_29_120327_create_product_v_m_templates_table.php new file mode 100644 index 0000000..d800154 --- /dev/null +++ b/database/migrations/2026_01_29_120327_create_product_v_m_templates_table.php @@ -0,0 +1,27 @@ +id(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('product_v_m_templates'); + } +}; diff --git a/public/uploads/files/Logo.png b/public/uploads/files/Logo.png index 6ddb267..1c0840a 100644 Binary files a/public/uploads/files/Logo.png and b/public/uploads/files/Logo.png differ diff --git a/resources/views/admin/sidebar.blade.php b/resources/views/admin/sidebar.blade.php index e618657..0810b36 100644 --- a/resources/views/admin/sidebar.blade.php +++ b/resources/views/admin/sidebar.blade.php @@ -25,321 +25,67 @@