update
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums\Product;
|
||||
|
||||
enum ProductTypeEnums: string
|
||||
{
|
||||
case VPS = 'vps';
|
||||
case HOSTING = 'hosting';
|
||||
case CLOUD = 'cloud';
|
||||
case EMAIL = 'email';
|
||||
case SSL = 'ssl';
|
||||
case DOMAIN = 'domain';
|
||||
case WEB_DESIGN = 'web design';
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::VPS => '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',
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Traits\HasUuid;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Product extends Model
|
||||
{
|
||||
use HasFactory, HasUuid;
|
||||
|
||||
protected array $uuidColumns = ['uuid'];
|
||||
protected string $slugColumn = 'name';
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'slug',
|
||||
'description',
|
||||
'price',
|
||||
'price_sale',
|
||||
'billing_cycle',
|
||||
'cpu',
|
||||
'ram',
|
||||
'gpu',
|
||||
'disk',
|
||||
'bandwidth',
|
||||
'is_active',
|
||||
'sort_order',
|
||||
];
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ProductVMTemplates extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class VirtualMachines extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Traits;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
trait HasUuid
|
||||
{
|
||||
protected static function bootHasUuid(): void
|
||||
{
|
||||
static::creating(function ($model) {
|
||||
foreach ($model->getUuidColumns() as $column) {
|
||||
if (empty($model->{$column})) {
|
||||
$model->{$column} = (string) Str::uuid();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public function getUuidColumns(): array
|
||||
{
|
||||
return property_exists($this, 'uuidColumns')
|
||||
? $this->uuidColumns
|
||||
: ['uuid'];
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -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",
|
||||
|
||||
Generated
+60
-1
@@ -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",
|
||||
|
||||
@@ -0,0 +1,234 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
[
|
||||
'title' => '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',
|
||||
],
|
||||
];
|
||||
Vendored
BIN
Binary file not shown.
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('products', function (Blueprint $table) {
|
||||
$table->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');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('virtual_machines', function (Blueprint $table) {
|
||||
$table->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');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('product_v_m_templates', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('product_v_m_templates');
|
||||
}
|
||||
};
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 272 KiB After Width: | Height: | Size: 79 KiB |
@@ -25,321 +25,67 @@
|
||||
<nav class="mt-2">
|
||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
|
||||
data-accordion="false">
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link">
|
||||
<i class="fas fa-cubes nav-icon"></i>
|
||||
<p>
|
||||
Package vCenter
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview">
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('package.datacenter.index') }}" class="nav-link">
|
||||
<i class="fas fa-database nav-icon"></i>
|
||||
<p>Datacenter</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('package.host.index') }}" class="nav-link">
|
||||
<i class="fas fa-street-view nav-icon"></i>
|
||||
<p>Host</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('package.datastore.index') }}" class="nav-link">
|
||||
<i class="fas fa-hdd nav-icon"></i>
|
||||
<p>Datastore</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('package.folder.index') }}" class="nav-link">
|
||||
<i class="far fa-folder nav-icon"></i>
|
||||
<p>Folder</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('package.network.index') }}" class="nav-link">
|
||||
<i class="fas fa-network-wired nav-icon"></i>
|
||||
<p>Network Adapter</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('package.group.index') }}" class="nav-link">
|
||||
<i class="fas fa-layer-group nav-icon"></i>
|
||||
<p>Group Os</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('package.version.index') }}" class="nav-link">
|
||||
<i class="fas fa-code-branch nav-icon"></i>
|
||||
<p>Os Version</p>
|
||||
</a>
|
||||
</li>
|
||||
@foreach (config('sidebar') as $item)
|
||||
@php
|
||||
$isActive = false;
|
||||
$hasChildren = isset($item['children']) && count($item['children']) > 0;
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('package.ipaddress.index') }}" class="nav-link">
|
||||
<i class="fas fa-map-marker-alt nav-icon"></i>
|
||||
<p>IP Mapping</p>
|
||||
</a>
|
||||
</li>
|
||||
if ($hasChildren) {
|
||||
foreach ($item['children'] as $child) {
|
||||
if (isset($child['route']) && request()->routeIs($child['route'])) {
|
||||
$isActive = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (isset($item['route']) && request()->routeIs($item['route'])) {
|
||||
$isActive = true;
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('package.datastore.index') }}" class="nav-link">
|
||||
<i class="fas fa-hdd nav-icon"></i>
|
||||
<p>Location</p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link">
|
||||
<i class="fas fa-tools nav-icon"></i>
|
||||
<p>
|
||||
Module
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview">
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('module.dns.index') }}" class="nav-link">
|
||||
<i class="fas fa-globe nav-icon"></i>
|
||||
<p>Module DNS</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('module.hosting.index') }}" class="nav-link">
|
||||
<i class="fas fa-server nav-icon"></i>
|
||||
<p>Module Hosting</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('module.vcenter.index') }}" class="nav-link">
|
||||
<i class="fas fa-desktop nav-icon"></i>
|
||||
<p>Module vCenter</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('module.ippool.index') }}" class="nav-link">
|
||||
<i class="fas fa-network-wired nav-icon"></i>
|
||||
<p>Module IP Pool</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item {{ $hasChildren && $isActive ? 'menu-open' : '' }}">
|
||||
<a href="{{ $hasChildren ? '#' : (isset($item['route']) ? route($item['route'], $item['params'] ?? []) : '#') }}"
|
||||
class="nav-link {{ $isActive ? 'active' : '' }}">
|
||||
<i class="{{ $item['icon'] ?? 'far fa-circle' }} nav-icon"></i>
|
||||
<p>
|
||||
{{ $item['title'] }}
|
||||
@if ($hasChildren)
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
@endif
|
||||
</p>
|
||||
</a>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link">
|
||||
<i class="fas fa-users-cog nav-icon"></i>
|
||||
<p>
|
||||
Manager Admin
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview">
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.user.index') }}" class="nav-link">
|
||||
<i class="fas fa-users nav-icon"></i>
|
||||
<p>
|
||||
List Admin
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('role.index') }}" class="nav-link">
|
||||
<i class="fas fa-user-tag nav-icon"></i>
|
||||
<p>Administrator Roles</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link">
|
||||
<i class="fas fa-users nav-icon"></i>
|
||||
<p>
|
||||
Client
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview">
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('customer.index') }}" class="nav-link">
|
||||
<i class="fas fa-user-friends nav-icon"></i>
|
||||
<p>View All Client</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('customer.create') }}" class="nav-link">
|
||||
<i class="fas fa-user-plus nav-icon"></i>
|
||||
<p>Add new Client</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link">
|
||||
<i class="fab fa-aws nav-icon"></i>
|
||||
<p>
|
||||
Product
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview">
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('product.index') }}" class="nav-link">
|
||||
<i class="fas fa-list nav-icon"></i>
|
||||
<p>All Product/Services</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('addon.index') }}" class="nav-link">
|
||||
<i class="fas fa-puzzle-piece nav-icon"></i>
|
||||
<p>Product Addon</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('domain.index') }}" class="nav-link">
|
||||
<i class="fas fa-globe-europe nav-icon"></i>
|
||||
<p>Domain Pricing</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link">
|
||||
<i class="fas fa-store nav-icon"></i>
|
||||
<p>
|
||||
Orders
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview">
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.order.index') }}" class="nav-link">
|
||||
<i class="fas fa-shopping-cart nav-icon"></i>
|
||||
<p>View All Orders</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.order.index', ['status' => 'pending']) }}" class="nav-link">
|
||||
<i class="fas fa-shopping-cart nav-icon"></i>
|
||||
<p>Pending Orders</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.order.index', ['status' => 'processing']) }}" class="nav-link">
|
||||
<i class="fas fa-cogs nav-icon"></i>
|
||||
<p>Processing Orders</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.order.index', ['status' => 'active']) }}" class="nav-link">
|
||||
<i class="fas fa-shopping-cart nav-icon"></i>
|
||||
<p>Active Orders</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.order.index', ['status' => 'cancel']) }}" class="nav-link">
|
||||
<i class="fas fa-shopping-cart nav-icon"></i>
|
||||
<p>Cancel Orders</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.order.create') }}" class="nav-link">
|
||||
<i class="fas fa-cart-plus nav-icon"></i>
|
||||
<p>Add New Orders</p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link">
|
||||
<i class="fas fa-file-invoice nav-icon"></i>
|
||||
<p>
|
||||
Invoices
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview">
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.invoice.index') }}" class="nav-link">
|
||||
<i class="fas fa-file-invoice nav-icon"></i>
|
||||
<p>View All Invoice</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.invoice.index', ['status' => 'unpaid']) }}" class="nav-link">
|
||||
<i class="fas fa-file-invoice nav-icon"></i>
|
||||
<p>Pending Invoice</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.invoice.index', ['status' => 'active']) }}" class="nav-link">
|
||||
<i class="fas fa-file-invoice nav-icon"></i>
|
||||
<p>Paid Invoice</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.invoice.index', ['status' => 'cancel']) }}" class="nav-link">
|
||||
<i class="fas fa-file-invoice nav-icon"></i>
|
||||
<p>Cancel Invoice</p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link">
|
||||
<i class="fas fa-folder nav-icon"></i>
|
||||
<p>
|
||||
Menus
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview">
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('menu.index') }}" class="nav-link">
|
||||
|
||||
<i class="fas fa-file-invoice nav-icon"></i>
|
||||
<p>View All Menu</p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('coupon.index') }}" class="nav-link">
|
||||
<i class="fas fa-tags nav-icon"></i>
|
||||
<p>
|
||||
Coupon
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('post.index') }}" class="nav-link">
|
||||
<i class="fas fa-blog nav-icon"></i>
|
||||
<p>
|
||||
Posts
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('support.index') }}" class="nav-link">
|
||||
<i class="fas fa-ticket-alt nav-icon"></i>
|
||||
<p>
|
||||
Support
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('payment.index') }}" class="nav-link">
|
||||
<i class="far fa-credit-card nav-icon"></i>
|
||||
<p>
|
||||
Payment Method
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
@if ($hasChildren)
|
||||
<ul class="nav nav-treeview">
|
||||
@foreach ($item['children'] as $child)
|
||||
@php
|
||||
$childActive = isset($child['route']) && request()->routeIs($child['route']);
|
||||
// Check simple params equality for stricter active state if needed,
|
||||
// but usually routeIs is enough.
|
||||
// Specific case for order status params
|
||||
if (isset($child['params']) && request()->routeIs($child['route'])) {
|
||||
$childActive = true;
|
||||
foreach ($child['params'] as $key => $value) {
|
||||
if (request($key) != $value) {
|
||||
$childActive = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
<li class="nav-item">
|
||||
<a href="{{ isset($child['route']) ? route($child['route'], $child['params'] ?? []) : '#' }}"
|
||||
class="nav-link {{ $childActive ? 'active' : '' }}">
|
||||
<i class="{{ $child['icon'] ?? 'far fa-circle' }} nav-icon"></i>
|
||||
<p>{{ $child['title'] }}</p>
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
</li>
|
||||
@endforeach
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user