1
0
Fork 0

optimize product seeder

fix merge mistake
main
A1Gard 1 year ago
parent 5930dca3fa
commit 0781a8710d

@ -21,7 +21,7 @@ class CatSeeder extends Seeder
Cat::factory()->create(['name' => 'برندها','slug' => 'برندها']); Cat::factory()->create(['name' => 'برندها','slug' => 'برندها']);
Cat::factory()->create(['name' => 'اپل','slug' => 'اپل', 'parent_id' => 3]); Cat::factory()->create(['name' => 'اپل','slug' => 'اپل', 'parent_id' => 3]);
Cat::factory()->create(['name' => 'سامسونگ','slug' => 'سامسونگ', 'parent_id' => 3]); Cat::factory()->create(['name' => 'سامسونگ','slug' => 'سامسونگ', 'parent_id' => 3]);
Cat::factory()->create(['name' => 'PC','slug' => 'PC']); Cat::factory()->create(['name' => 'لپ‌تاپ و PC','slug' => 'لپ‌تاپ-و-PC']);
Cat::factory()->create(['name' => 'آی‌مک','slug' => 'iMac', 'parent_id' => 6]); Cat::factory()->create(['name' => 'آی‌مک','slug' => 'iMac', 'parent_id' => 6]);
Cat::factory()->create(['name' => 'آیفون','slug' => 'iphone', 'parent_id' => 1]); Cat::factory()->create(['name' => 'آیفون','slug' => 'iphone', 'parent_id' => 1]);
Cat::factory()->create(['name' => 'آی‌پد','slug' => 'iPad', 'parent_id' => 2]); Cat::factory()->create(['name' => 'آی‌پد','slug' => 'iPad', 'parent_id' => 2]);

@ -87,8 +87,8 @@ class PostSeeder extends Seeder
$p->hash = date('Ym') . str_pad(dechex(crc32($p->slug)), 8, '0', STR_PAD_LEFT); $p->hash = date('Ym') . str_pad(dechex(crc32($p->slug)), 8, '0', STR_PAD_LEFT);
$p->save(); $p->save();
$p->categories()->sync([$item['category_id']]); $p->categories()->sync([$item['category_id']]);
$num = rand(1, 7); $num = rand(1, 6);
$p->addMedia(__DIR__ . "/img/ps$num.jpg")->preservingOriginal()->toMediaCollection(); $p->addMedia(__DIR__ . "/img/$num/$num.jpg")->preservingOriginal()->toMediaCollection();
$p->save(); $p->save();
} }
} }

@ -17,16 +17,69 @@ class ProductSeeder extends Seeder
public function run() public function run()
{ {
Product::factory()->count(15)->create(); $plans = [
1 => [
'dir' => __DIR__ . "/img/1/", // fake images
'main' => 8, // main cat
'cats' => [1, 8, 4], // all cats
'max' => 12, // max images for seed
],
2 => [
'dir' => __DIR__ . "/img/2/", // fake images
'main' => 9, // main cat
'cats' => [1, 9, 4], // all cats
'max' => 12, // max images for seed
],
3 => [
'dir' => __DIR__ . "/img/3/", // fake images
'main' => 9, // main cat
'cats' => [1, 9, 4], // all cats
'max' => 10, // max images for seed
],
4 => [
'dir' => __DIR__ . "/img/4/", // fake images
'main' => 1, // main cat
'cats' => [1, 5], // all cats
'max' => 10, // max images for seed
],
5 => [
'dir' => __DIR__ . "/img/4/", // fake images
'main' => 2, // main cat
'cats' => [2, 5], // all cats
'max' => 10, // max images for seed
],
6 => [
'dir' => __DIR__ . "/img/4/", // fake images
'main' => 6, // main cat
'cats' => [6, 5], // all cats
'max' => 10, // max images for seed
],
];
Product::factory()->count(31)->create();
$products = Product::all(); $products = Product::all();
foreach ($products as $product) { foreach ($products as $product) {
$cats = Cat::inRandomOrder()->limit(3)->pluck('id'); // $cats = Cat::inRandomOrder()->limit(3)->pluck('id');
$product->categories()->sync($cats); // $product->categories()->sync($cats);
$num = rand(1, 7); if ($product->id < 6) {
$product->addMedia(__DIR__ . "/img/ps$num.jpg")->preservingOriginal()->toMediaCollection(); $plan = 1;
$num = rand(1, 7); } else if ($product->id < 11) {
$product->addMedia(__DIR__ . "/img/ps$num.jpg")->preservingOriginal()->toMediaCollection(); $plan = 2;
$product->cat_id = rand(1, 2); } else if ($product->id < 16) {
$plan = 3;
} else if ($product->id < 21) {
$plan = 4;
} else if ($product->id < 26) {
$plan = 5;
} else {
$plan = 6;
}
$product->categories()->sync($plans[$plan]['cats']);
$num = rand(1, $plans[$plan]['max']);
$product->addMedia($plans[$plan]['dir'] . "$num.jpg")->preservingOriginal()->toMediaCollection();
$num = rand(1, $plans[$plan]['max']);
$product->addMedia($plans[$plan]['dir'] . "$num.jpg")->preservingOriginal()->toMediaCollection();
$product->cat_id = $plans[$plan]['main'];
$product->save();
} }
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 895 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 668 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 649 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

73
package-lock.json generated

@ -6,37 +6,36 @@
"": { "": {
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-free": "^6.1.1", "@fortawesome/fontawesome-free": "^6.1.1",
"alertifyjs": "^1.13.1",
"chart.js": "^3.8.2",
"hc-offcanvas-nav": "^6.1.5",
"jquery": "^2.2.4", "jquery": "^2.2.4",
"jquery-sortable": "^0.9.13", "jquery-sortable": "^0.9.13",
"lightbox2": "^2.11.3",
"owl.carousel": "^2.3.4",
"persian-date": "^1.1.0",
"persian-datepicker": "^1.2.0",
"rvnm": "^1.4.0", "rvnm": "^1.4.0",
"select2": "^4.1.0-rc.0", "select2": "^4.1.0-rc.0",
"vazir-font": "^30.1.0", "vazir-font": "^30.1.0",
"vue-multiselect": "^2.1.6", "vue-multiselect": "^2.1.6",
"vue-select2": "^0.2.6", "vue-select2": "^0.2.6",
"vue-simple-range-slider": "^1.0.0", "vue-simple-range-slider": "^1.0.0"
"x-mega-menu": "^1.2.0",
"xzoom": "^1.0.15"
}, },
"devDependencies": { "devDependencies": {
"@popperjs/core": "^2.10.2", "@popperjs/core": "^2.10.2",
"alertifyjs": "^1.13.1",
"axios": "^0.25", "axios": "^0.25",
"bootstrap": "^5.3.0", "bootstrap": "^5.3.0",
"chart.js": "^3.8.2",
"laravel-mix": "^6.0.6", "laravel-mix": "^6.0.6",
"lightbox2": "^2.11.3",
"lodash": "^4.17.19", "lodash": "^4.17.19",
"owl.carousel": "^2.3.4",
"persian-date": "^1.1.0",
"persian-datepicker": "^1.2.0",
"postcss": "^8.1.14", "postcss": "^8.1.14",
"resolve-url-loader": "^3.1.2", "resolve-url-loader": "^3.1.2",
"sass": "^1.32.11", "sass": "^1.32.11",
"sass-loader": "^11.0.1", "sass-loader": "^11.0.1",
"vue": "^2.6.12", "vue": "^2.6.12",
"vue-loader": "^15.9.8", "vue-loader": "^15.9.8",
"vue-template-compiler": "^2.7.10" "vue-template-compiler": "^2.7.10",
"x-mega-menu": "^1.2.0",
"xzoom": "^1.0.15"
} }
}, },
"node_modules/@ampproject/remapping": { "node_modules/@ampproject/remapping": {
@ -2555,7 +2554,8 @@
"node_modules/alertifyjs": { "node_modules/alertifyjs": {
"version": "1.13.1", "version": "1.13.1",
"resolved": "https://registry.npmjs.org/alertifyjs/-/alertifyjs-1.13.1.tgz", "resolved": "https://registry.npmjs.org/alertifyjs/-/alertifyjs-1.13.1.tgz",
"integrity": "sha512-CckZE2dZDsEEXglOXKxT00vUDV5A6udZom+bn1XHdIWlbSFZgYq7UXCBlwkShhIH3Li/1VxLmr55GOQFQ12WSg==" "integrity": "sha512-CckZE2dZDsEEXglOXKxT00vUDV5A6udZom+bn1XHdIWlbSFZgYq7UXCBlwkShhIH3Li/1VxLmr55GOQFQ12WSg==",
"dev": true
}, },
"node_modules/ansi-html-community": { "node_modules/ansi-html-community": {
"version": "0.0.8", "version": "0.0.8",
@ -3246,7 +3246,8 @@
"node_modules/chart.js": { "node_modules/chart.js": {
"version": "3.8.2", "version": "3.8.2",
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.8.2.tgz", "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.8.2.tgz",
"integrity": "sha512-7rqSlHWMUKFyBDOJvmFGW2lxULtcwaPLegDjX/Nu5j6QybY+GCiQkEY+6cqHw62S5tcwXMD8Y+H5OBGoR7d+ZQ==" "integrity": "sha512-7rqSlHWMUKFyBDOJvmFGW2lxULtcwaPLegDjX/Nu5j6QybY+GCiQkEY+6cqHw62S5tcwXMD8Y+H5OBGoR7d+ZQ==",
"dev": true
}, },
"node_modules/chokidar": { "node_modules/chokidar": {
"version": "3.5.3", "version": "3.5.3",
@ -5111,11 +5112,6 @@
"minimalistic-assert": "^1.0.1" "minimalistic-assert": "^1.0.1"
} }
}, },
"node_modules/hc-offcanvas-nav": {
"version": "6.1.5",
"resolved": "https://registry.npmjs.org/hc-offcanvas-nav/-/hc-offcanvas-nav-6.1.5.tgz",
"integrity": "sha512-l3wHyZijyDtuaNHXMPCWJKhMLhVcGLwjwkxIr37/oeFC5PZzmxsQNSYY6V4vRE8d5AtFbiPGaAqlXtul2UfoCw=="
},
"node_modules/he": { "node_modules/he": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
@ -5899,7 +5895,8 @@
"node_modules/lightbox2": { "node_modules/lightbox2": {
"version": "2.11.3", "version": "2.11.3",
"resolved": "https://registry.npmjs.org/lightbox2/-/lightbox2-2.11.3.tgz", "resolved": "https://registry.npmjs.org/lightbox2/-/lightbox2-2.11.3.tgz",
"integrity": "sha512-Q4v6il/OK9ttgEkAxSok/jrI/LUbqTrePFchqP2x/59qaDIZgJjEEc5Xf7peSMc/55Zo5PAgmX6EiN/BeEeUBQ==" "integrity": "sha512-Q4v6il/OK9ttgEkAxSok/jrI/LUbqTrePFchqP2x/59qaDIZgJjEEc5Xf7peSMc/55Zo5PAgmX6EiN/BeEeUBQ==",
"dev": true
}, },
"node_modules/lilconfig": { "node_modules/lilconfig": {
"version": "2.0.5", "version": "2.0.5",
@ -6555,6 +6552,7 @@
"version": "2.3.4", "version": "2.3.4",
"resolved": "https://registry.npmjs.org/owl.carousel/-/owl.carousel-2.3.4.tgz", "resolved": "https://registry.npmjs.org/owl.carousel/-/owl.carousel-2.3.4.tgz",
"integrity": "sha512-JaDss9+feAvEW8KZppPSpllfposEzQiW+Ytt/Xm5t/3CTJ7YVmkh6RkWixoA2yXk2boIwedYxOvrrppIGzru9A==", "integrity": "sha512-JaDss9+feAvEW8KZppPSpllfposEzQiW+Ytt/Xm5t/3CTJ7YVmkh6RkWixoA2yXk2boIwedYxOvrrppIGzru9A==",
"dev": true,
"dependencies": { "dependencies": {
"jquery": ">=1.8.3" "jquery": ">=1.8.3"
} }
@ -6771,12 +6769,14 @@
"node_modules/persian-date": { "node_modules/persian-date": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/persian-date/-/persian-date-1.1.0.tgz", "resolved": "https://registry.npmjs.org/persian-date/-/persian-date-1.1.0.tgz",
"integrity": "sha512-YwV3703jLTTJFFQfP3RvMfvKZc5Z1yE++Deywox+hkVLuVN81VsTaZFma9k5P9SgfSUvXjiylbQVuf4YYLGOow==" "integrity": "sha512-YwV3703jLTTJFFQfP3RvMfvKZc5Z1yE++Deywox+hkVLuVN81VsTaZFma9k5P9SgfSUvXjiylbQVuf4YYLGOow==",
"dev": true
}, },
"node_modules/persian-datepicker": { "node_modules/persian-datepicker": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/persian-datepicker/-/persian-datepicker-1.2.0.tgz", "resolved": "https://registry.npmjs.org/persian-datepicker/-/persian-datepicker-1.2.0.tgz",
"integrity": "sha512-o0krgZQsLDxaADui8rVL7G4P1MXXi2IWFseFhgE7RahdaTqAcBj6C5fhwePMqOTJazl1PwB6dAQnKZ9VGKhItA==", "integrity": "sha512-o0krgZQsLDxaADui8rVL7G4P1MXXi2IWFseFhgE7RahdaTqAcBj6C5fhwePMqOTJazl1PwB6dAQnKZ9VGKhItA==",
"dev": true,
"dependencies": { "dependencies": {
"jquery": "^3.3.1", "jquery": "^3.3.1",
"persian-date": "next" "persian-date": "next"
@ -6785,7 +6785,8 @@
"node_modules/persian-datepicker/node_modules/jquery": { "node_modules/persian-datepicker/node_modules/jquery": {
"version": "3.6.0", "version": "3.6.0",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
"integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==" "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==",
"dev": true
}, },
"node_modules/picocolors": { "node_modules/picocolors": {
"version": "1.0.0", "version": "1.0.0",
@ -9753,7 +9754,8 @@
"node_modules/x-mega-menu": { "node_modules/x-mega-menu": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/x-mega-menu/-/x-mega-menu-1.2.0.tgz", "resolved": "https://registry.npmjs.org/x-mega-menu/-/x-mega-menu-1.2.0.tgz",
"integrity": "sha512-KuqjPoCptgAujAi4v2M0WnwfKnkCF1RbZIrYpPxvikOvFd4O/FlIasjRTOb/r2kDZ3GLPfT0MbiLlVp5Jm4gVg==" "integrity": "sha512-KuqjPoCptgAujAi4v2M0WnwfKnkCF1RbZIrYpPxvikOvFd4O/FlIasjRTOb/r2kDZ3GLPfT0MbiLlVp5Jm4gVg==",
"dev": true
}, },
"node_modules/xtend": { "node_modules/xtend": {
"version": "4.0.2", "version": "4.0.2",
@ -9768,6 +9770,7 @@
"version": "1.0.15", "version": "1.0.15",
"resolved": "https://registry.npmjs.org/xzoom/-/xzoom-1.0.15.tgz", "resolved": "https://registry.npmjs.org/xzoom/-/xzoom-1.0.15.tgz",
"integrity": "sha512-g95AXPOmVy6mu3kTFMkHKLirdyaIJbUdNN47coMzthNusvlJswnQwYQNl3H5EgxTtBvFETn5byPqYEQs+gng/A==", "integrity": "sha512-g95AXPOmVy6mu3kTFMkHKLirdyaIJbUdNN47coMzthNusvlJswnQwYQNl3H5EgxTtBvFETn5byPqYEQs+gng/A==",
"dev": true,
"dependencies": { "dependencies": {
"jquery": ">=1.2.6" "jquery": ">=1.2.6"
} }
@ -11753,7 +11756,8 @@
"alertifyjs": { "alertifyjs": {
"version": "1.13.1", "version": "1.13.1",
"resolved": "https://registry.npmjs.org/alertifyjs/-/alertifyjs-1.13.1.tgz", "resolved": "https://registry.npmjs.org/alertifyjs/-/alertifyjs-1.13.1.tgz",
"integrity": "sha512-CckZE2dZDsEEXglOXKxT00vUDV5A6udZom+bn1XHdIWlbSFZgYq7UXCBlwkShhIH3Li/1VxLmr55GOQFQ12WSg==" "integrity": "sha512-CckZE2dZDsEEXglOXKxT00vUDV5A6udZom+bn1XHdIWlbSFZgYq7UXCBlwkShhIH3Li/1VxLmr55GOQFQ12WSg==",
"dev": true
}, },
"ansi-html-community": { "ansi-html-community": {
"version": "0.0.8", "version": "0.0.8",
@ -12283,7 +12287,8 @@
"chart.js": { "chart.js": {
"version": "3.8.2", "version": "3.8.2",
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.8.2.tgz", "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.8.2.tgz",
"integrity": "sha512-7rqSlHWMUKFyBDOJvmFGW2lxULtcwaPLegDjX/Nu5j6QybY+GCiQkEY+6cqHw62S5tcwXMD8Y+H5OBGoR7d+ZQ==" "integrity": "sha512-7rqSlHWMUKFyBDOJvmFGW2lxULtcwaPLegDjX/Nu5j6QybY+GCiQkEY+6cqHw62S5tcwXMD8Y+H5OBGoR7d+ZQ==",
"dev": true
}, },
"chokidar": { "chokidar": {
"version": "3.5.3", "version": "3.5.3",
@ -13733,11 +13738,6 @@
"minimalistic-assert": "^1.0.1" "minimalistic-assert": "^1.0.1"
} }
}, },
"hc-offcanvas-nav": {
"version": "6.1.5",
"resolved": "https://registry.npmjs.org/hc-offcanvas-nav/-/hc-offcanvas-nav-6.1.5.tgz",
"integrity": "sha512-l3wHyZijyDtuaNHXMPCWJKhMLhVcGLwjwkxIr37/oeFC5PZzmxsQNSYY6V4vRE8d5AtFbiPGaAqlXtul2UfoCw=="
},
"he": { "he": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
@ -14315,7 +14315,8 @@
"lightbox2": { "lightbox2": {
"version": "2.11.3", "version": "2.11.3",
"resolved": "https://registry.npmjs.org/lightbox2/-/lightbox2-2.11.3.tgz", "resolved": "https://registry.npmjs.org/lightbox2/-/lightbox2-2.11.3.tgz",
"integrity": "sha512-Q4v6il/OK9ttgEkAxSok/jrI/LUbqTrePFchqP2x/59qaDIZgJjEEc5Xf7peSMc/55Zo5PAgmX6EiN/BeEeUBQ==" "integrity": "sha512-Q4v6il/OK9ttgEkAxSok/jrI/LUbqTrePFchqP2x/59qaDIZgJjEEc5Xf7peSMc/55Zo5PAgmX6EiN/BeEeUBQ==",
"dev": true
}, },
"lilconfig": { "lilconfig": {
"version": "2.0.5", "version": "2.0.5",
@ -14834,6 +14835,7 @@
"version": "2.3.4", "version": "2.3.4",
"resolved": "https://registry.npmjs.org/owl.carousel/-/owl.carousel-2.3.4.tgz", "resolved": "https://registry.npmjs.org/owl.carousel/-/owl.carousel-2.3.4.tgz",
"integrity": "sha512-JaDss9+feAvEW8KZppPSpllfposEzQiW+Ytt/Xm5t/3CTJ7YVmkh6RkWixoA2yXk2boIwedYxOvrrppIGzru9A==", "integrity": "sha512-JaDss9+feAvEW8KZppPSpllfposEzQiW+Ytt/Xm5t/3CTJ7YVmkh6RkWixoA2yXk2boIwedYxOvrrppIGzru9A==",
"dev": true,
"requires": { "requires": {
"jquery": ">=1.8.3" "jquery": ">=1.8.3"
} }
@ -15002,12 +15004,14 @@
"persian-date": { "persian-date": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/persian-date/-/persian-date-1.1.0.tgz", "resolved": "https://registry.npmjs.org/persian-date/-/persian-date-1.1.0.tgz",
"integrity": "sha512-YwV3703jLTTJFFQfP3RvMfvKZc5Z1yE++Deywox+hkVLuVN81VsTaZFma9k5P9SgfSUvXjiylbQVuf4YYLGOow==" "integrity": "sha512-YwV3703jLTTJFFQfP3RvMfvKZc5Z1yE++Deywox+hkVLuVN81VsTaZFma9k5P9SgfSUvXjiylbQVuf4YYLGOow==",
"dev": true
}, },
"persian-datepicker": { "persian-datepicker": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/persian-datepicker/-/persian-datepicker-1.2.0.tgz", "resolved": "https://registry.npmjs.org/persian-datepicker/-/persian-datepicker-1.2.0.tgz",
"integrity": "sha512-o0krgZQsLDxaADui8rVL7G4P1MXXi2IWFseFhgE7RahdaTqAcBj6C5fhwePMqOTJazl1PwB6dAQnKZ9VGKhItA==", "integrity": "sha512-o0krgZQsLDxaADui8rVL7G4P1MXXi2IWFseFhgE7RahdaTqAcBj6C5fhwePMqOTJazl1PwB6dAQnKZ9VGKhItA==",
"dev": true,
"requires": { "requires": {
"jquery": "^3.3.1", "jquery": "^3.3.1",
"persian-date": "next" "persian-date": "next"
@ -15016,7 +15020,8 @@
"jquery": { "jquery": {
"version": "3.6.0", "version": "3.6.0",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
"integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==" "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==",
"dev": true
} }
} }
}, },
@ -17187,7 +17192,8 @@
"x-mega-menu": { "x-mega-menu": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/x-mega-menu/-/x-mega-menu-1.2.0.tgz", "resolved": "https://registry.npmjs.org/x-mega-menu/-/x-mega-menu-1.2.0.tgz",
"integrity": "sha512-KuqjPoCptgAujAi4v2M0WnwfKnkCF1RbZIrYpPxvikOvFd4O/FlIasjRTOb/r2kDZ3GLPfT0MbiLlVp5Jm4gVg==" "integrity": "sha512-KuqjPoCptgAujAi4v2M0WnwfKnkCF1RbZIrYpPxvikOvFd4O/FlIasjRTOb/r2kDZ3GLPfT0MbiLlVp5Jm4gVg==",
"dev": true
}, },
"xtend": { "xtend": {
"version": "4.0.2", "version": "4.0.2",
@ -17199,6 +17205,7 @@
"version": "1.0.15", "version": "1.0.15",
"resolved": "https://registry.npmjs.org/xzoom/-/xzoom-1.0.15.tgz", "resolved": "https://registry.npmjs.org/xzoom/-/xzoom-1.0.15.tgz",
"integrity": "sha512-g95AXPOmVy6mu3kTFMkHKLirdyaIJbUdNN47coMzthNusvlJswnQwYQNl3H5EgxTtBvFETn5byPqYEQs+gng/A==", "integrity": "sha512-g95AXPOmVy6mu3kTFMkHKLirdyaIJbUdNN47coMzthNusvlJswnQwYQNl3H5EgxTtBvFETn5byPqYEQs+gng/A==",
"dev": true,
"requires": { "requires": {
"jquery": ">=1.2.6" "jquery": ">=1.2.6"
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -4,8 +4,7 @@
@import "~vazir-font/dist/font-face.css"; @import "~vazir-font/dist/font-face.css";
@import "~vue-multiselect/dist/vue-multiselect.min.css"; @import "~vue-multiselect/dist/vue-multiselect.min.css";
@import "~persian-datepicker/dist/css/persian-datepicker.min.css"; @import "~persian-datepicker/dist/css/persian-datepicker.min.css";
@import '~hc-offcanvas-nav/src/scss/core';
@import '~hc-offcanvas-nav/src/scss/toggle';
@import 'theme-white-menu'; @import 'theme-white-menu';
// Variables // Variables
@import 'variables'; @import 'variables';

@ -1,4 +1,4 @@
require('hc-offcanvas-nav/dist/hc-offcanvas-nav'); // require('hc-offcanvas-nav/dist/hc-offcanvas-nav');
// import xMegaMenu from 'x-mega-menu/src/x-mega-menu'; // import xMegaMenu from 'x-mega-menu/src/x-mega-menu';
import xm from 'x-mega-menu/dist/x-mega-menu.min'; import xm from 'x-mega-menu/dist/x-mega-menu.min';

@ -29,9 +29,9 @@
</label> </label>
<select name="customer_id" data-live-search="true" id="customer_id" <select name="customer_id" data-live-search="true" id="customer_id"
class="form-control searchable @error('customer_id') is-invalid @enderror"> class="form-control searchable @error('customer_id') is-invalid @enderror">
@foreach(\App\Models\Customer::all() as $customer ) @foreach(\App\models\Customer::all() as $customer )
<option value="{{ $customer->id }}" <option value="{{ $customer->id }}"
@if (old('customer_id',$invoice?->customer_id??null) == $customer->id ) selected @endif > {{$customer->name}} </option> @if (old('customer_id',$invoice->customer_id??null) == $customer->id ) selected @endif > {{$customer->name}} </option>
@endforeach @endforeach
</select> </select>
</div> </div>
@ -76,7 +76,6 @@
value="{{old('tracking_code',$invoice->tracking_code??null)}}"/> value="{{old('tracking_code',$invoice->tracking_code??null)}}"/>
</div> </div>
</div> </div>
@if(isset($invoice))
@foreach($invoice->products as $product ) @foreach($invoice->products as $product )
<div class="col-md-6"> <div class="col-md-6">
@ -87,8 +86,7 @@
<label for="products"> <label for="products">
{{__('Product')}} {{__('Product')}}
</label> </label>
<select data-live-search="true" name="products.ids[]" <select data-live-search="true" name="products.ids[]" data-live-search="true" id="products"
data-live-search="true" id="products"
class="form-control searchable"> class="form-control searchable">
@foreach(\App\models\Product::all() as $allProduct ) @foreach(\App\models\Product::all() as $allProduct )
<option value="{{ $allProduct->id }}" <option value="{{ $allProduct->id }}"
@ -102,12 +100,10 @@
<label for="count"> <label for="count">
{{__('Count')}} {{__('Count')}}
</label> </label>
<input type="number" name="products.counts[]" <input type="number" name="products.counts[]" value="{{$product->pivot->count}}"
value="{{$product->pivot->count}}"
id="" class="form-control"> id="" class="form-control">
<button class="btn btn-outline-danger " <button class="btn btn-outline-danger "
onclick="document.getElementById('product_{{$product->id}}').remove()"> onclick="document.getElementById('product_{{$product->id}}').remove()"> X
X
</button> </button>
</div> </div>
</div> </div>
@ -117,8 +113,6 @@
</div> </div>
@endforeach @endforeach
@endif
<div class="col-md-12"> <div class="col-md-12">
<label> &nbsp;</label> <label> &nbsp;</label>
<input name="" type="submit" class="btn btn-primary mt-2" value="{{__('Save')}}"/> <input name="" type="submit" class="btn btn-primary mt-2" value="{{__('Save')}}"/>

@ -3,7 +3,7 @@
{ {
"@context": "http://schema.org", "@context": "http://schema.org",
"@type": "WebSite", "@type": "WebSite",
"url": "{{config('app.url')}}", "url": "https://shop.ir/",
"name": "{{\SEOMeta::getTitle()}}", "name": "{{\SEOMeta::getTitle()}}",
"author": { "author": {
"@type": "Person", "@type": "Person",

@ -1,80 +1,12 @@
<!-- back to top -->
<div class="back-top-btn col-12 container mt-4">
<button class="mb-4 backtop-btn" id="myBtn" title="بازگشت به بالا">
<div>
<span>
<p class="mt-3">بازگشت به بالا</p>
</span>
</div>
<div>
<span>
<p class="d-block m-auto">
<i class="fa fa-arrow-up"></i>
</p>
</span>
</div>
</button>
</div>
<!-- back to top -->
<!-- top footer description --> <footer>
<div class="top-footer "> <div class="container">
<hr class="container"> <div class="row">
<div class="top-footer-title container"> <div class="col-md-3">
<h4> <h3>
فروشگاه اینترنتی فرداد، خرید لوازم آرایشی و بهداشتی، همراه زیبایی شما
</h4>
<p>
فروشگاه اینترنتی فرداد، مجموعه ی کاملی از بهترین برندهای لوازم آرایشی و بهداشتی در سراسر جهان را فراهم
آورده تا نیاز یکایک شما را برای خرید اینترنتی لوازم آرایشی و بهداشتی برآورده نماید. این مجموعه، شامل انواع
لوازم آرایشی برای آرایش صورت، چشم، ابرو، لب، بدن، ناخن و به طور کل مجموعه ای مجهز از ابزارهای آرایشی است. جز
آن لیستی کامل از ملزومات در زمینه مراقبت از پوست، محصولات مو و همینطور اکسسوری و زیورآلات می شود. شما می
تواند خریدهای خود در زمینه آرایشی-بهداشتی را با مناسب ترین قیمت و همینطور با استفاده از آفرهای ویژه از جمله
بخش جذاب آفروز در فرداد انجام دهید.
</p>
<h4>
برترین فروشگاه اینترنتی لوازم آرایشی و بهداشتی سال ۹۷ ایران
</h4>
<p>
فروشگاه اینترنتی فرداد، با بیش از ربع قرن تجربه در حوزه لوازم آرایشی و بهداشتی، موفق به کسب تندیس «برترین
فروشگاه اینترنتی لوازم آرایشی» با رای مردمی و نظر داوران از جشنواره وب موبایل ایران در سال ۹۷ شد. این امر با
پایبندی بر سه اصل مهم: تضمین اصل بودن کالا (با تأییدیه وزارت بهداشت)، ۷ روز ضمانت بازگشت کالا و مشاوره تخصصی
تحقق یافت. همینطور توانستیم در همایش صنایع سلامت محور در دی ماه ۱۴۰۰ به عنوان برند نمونه در حفظ سلامت
مشتریان، مفتخر به دریافت تندیس بلورین شویم.
</p>
<p>
فروشگاه اینترنتی فرداد، جهت رفاه و جلب رضایت مشتریان خود، روش های پرداخت متنوع را پیاده سازی کرده است تا
خرید لوازم آرایشی و بهداشتی را در هر زمان و مکانی میسر سازد. از دیگر ویژگی های فروشگاه اینترنتی فرداد، می
توان به تحویل کالا به صورت رایگان (برای خرید بالای ۲۵۰ هزار تومان) و تحویل ۲۴ ساعته در تهران اشاره نمود.
</p>
<p>
ما در فروشگاه اینترنتی فرداد، برای شما انواع برندهای معتبر داخلی و خارجی از جمله اوریفلیم، ایزادورا،
لورال، اسنس، بورژوا، مارال و ... را موجود نموده ایم و شما می توانید محصولات این برندها را بصورت اصل و
اورجینال در سایت تهیه نمایید. این بین برخی از محصولات در فروشگاه ما مورد توجه بیشتری از سوی شما قرار گرفته
اند؛ از آن جمله می توان به کرم پودر لورال و انواع شامپو بدون سولفات اشاره کرد.
</p>
<h4>
مشاوره تخصصی آرایشی برای شما
</h4>
<p>
فروشگاه اینترنتی فرداد برای پاسخ به سوالات و مشکلات زیبایی شما عزیزان، بستر شبکه اجتماعی (اینستاگرام و
توییتر) و مجله اینترنتی فرداد را فراهم آورده، تا بتوانید نیازها و مشکلات آرایشی خود را رفع نمایید و با
بهترین برندهای لوازم آرایشی و بهداشتی آشنا شوید. همچنین شما می توانید برای رفع مشکلات آرایشی خود با تیم
پشتیبانی فرداد تماس بگیرید و سوالات خود را از این تیم بپرسید. همینطور در مجله اینترنتی فرداد می توانید
به صورت رایگان از مقالات تخصصی و آموزشی در حوزه آرایش، زیبایی و سلامت بهره ببرید.
</p>
</div>
<hr class="container">
<!-- footer -->
<footer class="footer mt-0">
<div class="main-footer container">
<div class="row m-0">
<div
class="col-6 col-sm-6 col-md-4 col-lg-4 col-xl-4 text-center text-sm-center text-md-start text-lg-start">
<h6>
{{\App\Helpers\getSettingCategory('footer1')->name}} {{\App\Helpers\getSettingCategory('footer1')->name}}
</h6> </h3>
<ul class="footer-links"> <ul>
@foreach(\App\Helpers\getSettingCategory('footer1')->posts as $p) @foreach(\App\Helpers\getSettingCategory('footer1')->posts as $p)
<li> <li>
<a href="{{route('n.show',$p->slug)}}"> <a href="{{route('n.show',$p->slug)}}">
@ -84,12 +16,11 @@
@endforeach @endforeach
</ul> </ul>
</div> </div>
<div <div class="col-md-3">
class="col-6 col-sm-6 col-md-4 col-lg-4 col-xl-4 text-center text-sm-center text-md-start text-lg-start"> <h3>
<h6>
{{\App\Helpers\getSettingCategory('footer2')->name}} {{\App\Helpers\getSettingCategory('footer2')->name}}
</h6> </h3>
<ul class="footer-links"> <ul>
@foreach(\App\Helpers\getSettingCategory('footer2')->posts as $p) @foreach(\App\Helpers\getSettingCategory('footer2')->posts as $p)
<li> <li>
<a href="{{route('n.show',$p->slug)}}"> <a href="{{route('n.show',$p->slug)}}">
@ -99,91 +30,62 @@
@endforeach @endforeach
</ul> </ul>
</div> </div>
<div class="footer-mail col-12 col-sm-12 col-md-4 col-lg-4 col-xl-4">
<p>برای اطلاع از آخرین تخفیف‌ها و جدیدترین کالا‌ها در خبرنامه ثبت‌نام کنید.</p> <div class="col-md-3">
<div class="container-inp"> <h3>
<input type="email" required name="mail" class="input" placeholder="ایمیل خود را وارد کنید"> اطلاعات تماس
<button class="search__btn" name="mail"> </h3>
<i class="fa-solid fa-envelope"></i> <p class="text-secondary">
</button> افراد گروه سوم از اهمیت به پایان رساندن آگاه هستند. آنها با تفکر منطقی، طرحی روشن ارائه می‌کنند. آنها نه تنها برای پایان دادن به پروژه‌ی خود در آینده برنامه ریزی می‌کنند، بلکه به تمام نتایج و عواقب اجرای آن برنامه هم می‌اندیشند. این افراد کسانی هستند که هنر به پایان رساندن را می‌دانند.
</div> </p>
<a href="{{url('/')}}">
<img src="{{asset('images/logo.png')}}" class="d-block m-auto mt-4 " width="70" height="70"
alt="">
</a>
</div>
</div> </div>
<div class="validity row m-0"> <div class="col-md-3">
<div class="col-12 col-sm-12 col-md-4 col-lg-4 col-xl-4 mt-3"> <h3>
<div class="row m-0"> نمادها
<div class="col-6"> </h3>
<div class="text-center namad">
{!! \App\Helpers\getSetting('footer3') !!} {!! \App\Helpers\getSetting('footer3') !!}
</div> </div>
<div class="col-6">
{!! \App\Helpers\getSetting('footer4') !!}
</div>
</div> </div>
</div> <div class="col-md-12 pb-4">
<div class="col-12 col-sm-12 col-md-4 col-lg-4 col-xl-4 mt-3"> <hr>
<p class="footer-para"> <div class="p4 text-center social">
افراد گروه سوم از اهمیت به پایان رساندن آگاه هستند. آنها با تفکر منطقی، طرحی روشن ارائه می‌کنند.
آنها نه تنها برای پایان دادن به پروژه‌ی خود در آینده برنامه ریزی می‌کنند، بلکه به تمام نتایج
آینده برنامه ریزی می‌کنندآینده برنامه ریزی می‌کنندآینده برنامه ریزی می‌کنندآیندهآینده برنامه
ریزی می‌کنندآیندهریزی می‌کنندآیندمی‌کنندآینده برنامه ریزی بلکه به تمام نتایج و
عواقب اجرای آن برنامه هم می‌اندیشند. این افراد کسانی هستند که هنر به پایان.
</p>
</div>
<div class="col-12 col-sm-12 col-md-4 col-lg-4 col-xl-4 mt-3">
<h6 class="text-center">ما را در شبکه های اجتمایی دنبال کنید.</h6>
<div class="social-buttons mt-1">
@if(trim(\App\Helpers\getSetting('soc_in')) != '') @if(trim(\App\Helpers\getSetting('soc_in')) != '')
<a class="social-button social-button--instagram" aria-label="instagram" target="_blank" <a target="_blank" href="{{\App\Helpers\getSetting('soc_in')}}">
href="{{\App\Helpers\getSetting('soc_in')}}">
<i class="fab fa-instagram"></i> <i class="fab fa-instagram"></i>
</a> </a>
@endif @endif
@if(trim(\App\Helpers\getSetting('soc_tg')) != '') @if(trim(\App\Helpers\getSetting('soc_tg')) != '')
<a class="social-button social-button--telegram" aria-label="telegram" target="_blank" <a target="_blank" href="{{\App\Helpers\getSetting('soc_tg')}}">
href="{{\App\Helpers\getSetting('soc_tg')}}">
<i class="fab fa-telegram"></i> <i class="fab fa-telegram"></i>
</a> </a>
@endif @endif
@if(trim(\App\Helpers\getSetting('soc_wp')) != '') @if(trim(\App\Helpers\getSetting('soc_wp')) != '')
<a class="social-button social-button--whatsapp" aria-label="whatsapp" target="_blank" <a target="_blank"
href="https://api.whatsapp.com/send/?phone={{urlencode(\App\Helpers\getSetting('soc_wp'))}}&text=%D8%A8%D8%A7%20%D8%B3%D9%84%D8%A7%D9%85%0A%D8%A7%D8%B2%20%D8%B3%D8%A7%DB%8C%D8%AA%20%D8%A8%D8%B1%D8%A7%DB%8C%20%D8%B3%D9%81%D8%A7%D8%B1%D8%B4%20%D9%88%20%D9%BE%D8%B4%D8%AA%DB%8C%D8%A8%D8%A7%D9%86%DB%8C%20%D8%AA%D9%85%D8%A7%D8%B3%20%D9%85%DB%8C%DA%AF%DB%8C%D8%B1%D9%85&app_absent=0"> href="https://api.whatsapp.com/send/?phone={{urlencode(\App\Helpers\getSetting('soc_wp'))}}&text=%D8%A8%D8%A7%20%D8%B3%D9%84%D8%A7%D9%85%0A%D8%A7%D8%B2%20%D8%B3%D8%A7%DB%8C%D8%AA%20%D8%A8%D8%B1%D8%A7%DB%8C%20%D8%B3%D9%81%D8%A7%D8%B1%D8%B4%20%D9%88%20%D9%BE%D8%B4%D8%AA%DB%8C%D8%A8%D8%A7%D9%86%DB%8C%20%D8%AA%D9%85%D8%A7%D8%B3%20%D9%85%DB%8C%DA%AF%DB%8C%D8%B1%D9%85&app_absent=0">
<i class="fab fa-whatsapp"></i> <i class="fab fa-whatsapp"></i>
</a> </a>
@endif @endif
@if(trim(\App\Helpers\getSetting('soc_tw')) != '') @if(trim(\App\Helpers\getSetting('soc_tw')) != '')
<a class="social-button social-button--twitter" aria-label="twitter" target="_blank" <a target="_blank" href="{{\App\Helpers\getSetting('soc_tw')}}">
href="{{\App\Helpers\getSetting('soc_tw')}}">
<i class="fab fa-twitter"></i> <i class="fab fa-twitter"></i>
</a> </a>
@endif @endif
@if(trim(\App\Helpers\getSetting('soc_yt')) != '') @if(trim(\App\Helpers\getSetting('soc_yt')) != '')
<a class="social-button social-button--youtube" aria-label="youtube" target="_blank" <a target="_blank" href="{{\App\Helpers\getSetting('soc_yt')}}">
href="{{\App\Helpers\getSetting('soc_yt')}}">
<i class="fab fa-youtube"></i> <i class="fab fa-youtube"></i>
</a> </a>
@endif @endif
</div> </div>
<hr>
<div class="text-center text-black-50">
{{\App\Helpers\getSetting('copyright')}}
&copy; {{date('Y')}}
</div> </div>
</div> </div>
</div> </div>
</footer> </div>
<!-- footer --> </footer>
</div>
<!-- top footer description -->
<!-- terms -->
<div class="footer-terms text-center mt-3">
<p>
{{\App\Helpers\getSetting('copyright')}}
&copy; {{date('Y')}}
</p>
</div>
<!-- terms -->
<input type="hidden" id="fav-toggle" value="{{route('fav.toggle','')}}"> <input type="hidden" id="fav-toggle" value="{{route('fav.toggle','')}}">
@yield('js-content') @yield('js-content')
<script src="{{asset('js/theme.js')}}" defer></script> <script src="{{asset('js/theme.js')}}" defer></script>

@ -19,108 +19,125 @@
</head> </head>
<body> <body>
<!--header navbar-->
<nav class="up-nav col-12"> @if(trim(\App\Helpers\getSetting('soc_wp')) != '')
<a href="{{url('/')}}"> <a class="my-float"
<img src="{{asset('images/logo.png')}}" class="rounded-0" alt=""> target="_blank"
href="https://api.whatsapp.com/send/?phone={{urlencode(\App\Helpers\getSetting('soc_wp'))}}&text=%D8%A8%D8%A7%20%D8%B3%D9%84%D8%A7%D9%85%0A%D8%A7%D8%B2%20%D8%B3%D8%A7%DB%8C%D8%AA%20%D8%A8%D8%B1%D8%A7%DB%8C%20%D8%B3%D9%81%D8%A7%D8%B1%D8%B4%20%D9%88%20%D9%BE%D8%B4%D8%AA%DB%8C%D8%A8%D8%A7%D9%86%DB%8C%20%D8%AA%D9%85%D8%A7%D8%B3%20%D9%85%DB%8C%DA%AF%DB%8C%D8%B1%D9%85&app_absent=0">
<i class="fab fa-whatsapp"></i>
</a> </a>
</nav> @endif
<!--header--> <div id="preloader">
<header id="header" class="mt-1"> <div class="tvdd" role="img" aria-label="Three intersecting rings of twelve pulsing dots that never collide">
<div class="tvdd__ring">
<div class="tvdd__ring-dots">
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
</div>
</div>
<div class="tvdd__ring">
<div class="tvdd__ring-dots">
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
</div>
</div>
<div class="tvdd__ring">
<div class="tvdd__ring-dots">
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
<div class="tvdd__ring-dot"></div>
</div>
</div>
</div>
</div>
<a id="go-top" href="#">
<i class="fa fa-angle-up"></i>
</a>
<section id="top-top">
<div class="container"> <div class="container">
<div class="row align-items-center"> <div class="row">
<div class="col-sm-6 d-xl-none mb-2 "> <div class="col-lg-4 col-md-12 text-start">
<a href="#" class="btn btn-outline-light text-dark"> <div class='marquee'>
<i class="fa fa-search"></i> <div class="row mt-2 pt-1" >
</a> <a class="col" href="tel:{{\App\Helpers\getSetting('tel')}}">
<div class="btn btn-primary"> <i class="fa fa-phone-alt"></i>
<i class="fa fa-basket-shopping"></i> {{\App\Helpers\getSetting('tel')}}
<b class="card-count">
{{\App\Helpers\cardCount()}}
</b>
</div>
@if(Auth::guard('customer')->check())
<a class="btn btn-outline-info" href="{{route('customer')}}">
<i class="ri-user-line"></i>
</a>
@else
<a class="btn btn-outline-info" href="{{route('sign')}}">
<i class="ri-user-line"></i>
</a>
@endif
</div>
<div class="col-xl-3 d-none d-xl-block">
<div class="">
&nbsp;
<div class="btn btn-outline-info btn-icon">
<div class="icon">
<i class="ri-user-line"></i>
@if(Auth::guard('customer')->check())
<a href="{{route('customer')}}">
{{__("Profile")}}
</a> </a>
@else <a class="col" href="mail:{{\App\Helpers\getSetting('email')}}">
<a href="{{route('sign')}}"> <i class="fa fa-envelope"></i>
<i class="icofont-user"></i> {{\App\Helpers\getSetting('email')}}
{{__("Login / Register")}}
</a> </a>
@endif
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xl-6 "> <div class="col-lg-4 col-md-6">
<div class="input-group"> <div class="input-group flex-nowrap" style="margin-top: 1em;">
<input type="text" id="searching" data-url="{{route('search')}}" <input type="text" id="searching" data-url="{{route('search')}}"
data-ajax="{{route('search.ajax')}}" class="form-control silver" data-ajax="{{route('search.ajax')}}" class="form-control" placeholder="جستجو در محصولات..."
placeholder="جستجو در محصولات..."
aria-label="search" aria-label="search"
aria-describedby="addon-wrapping"> aria-describedby="addon-wrapping">
<button class="btn btn-outline-primary" type="button" id="button-addon2"> <span class="input-group-text" id="addon-wrapping">
<i class="ri-search-line"></i> <i class="icofont-search bg-custom2 text-light rounded-circle"></i>
</button> </span>
</div> </div>
</div> </div>
<div class="col-xl-3 text-end d-none d-xl-block"> <div class="col-lg-4 text-end col-md-6">
<div class="btn btn-outline-primary btn-icon"> <a type="button" class="btn btn-primary position-relative" href="{{route('card.show')}}">
<div class="icon"> <i class="icofont-shopping-cart"></i>
<b class="card-count"> سبد خرید
<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-primary">
<b id="card-count">
{{\App\Helpers\cardCount()}} {{\App\Helpers\cardCount()}}
&nbsp;
<i class="ri-shopping-cart-line float-end"></i>
</b> </b>
</div> </span>
</div>
</div>
<div class="col-xl-3 d-none d-xl-block">
<div class="btn btn-primary w-100 align-items-center justify-content-between d-flex" id="main-nav">
<i class="ri-menu-line float-start"></i>
همه محصولات
<i class="ri-arrow-drop-down-line float-end"></i>
@include('website.component.navbar')
</div>
</div>
<div class="col-xl-6 ">
<div class="d-flex justify-content-around">
{!! \App\Helpers\MenuShowByName('menu') !!}
</div>
</div>
<div class="col-xl-3 text-center">
<div>
<a class="small">
تلفن‌ تماس
</a> </a>
<br> @if(Auth::guard('customer')->check())
<a href="tel:{{\App\Helpers\getSetting('tel')}}" class="btn btn-secondary text-dark"> <div class="btn btn-outline-primary">
{{\App\Helpers\getSetting('tel')}} <a href="{{route('customer')}}">
{{__("Profile")}}
</a>
</div>
@else
<div class="btn btn-outline-primary">
<a href="{{route('sign')}}">
<i class="icofont-user"></i>
{{__("Login / Register")}}
</a> </a>
</div> </div>
@endif
</div> </div>
</div> </div>
</div> </div>
</header> </section>
<!--header-->
<div id="search-list"></div>
@include('website.component.navbar')

@ -1,49 +1,64 @@
<div id="nav-menu"> <nav>
<ul> <ul id="mega-menu">
@foreach(\App\Helpers\getMainCats(12) as $mcat) <li>
<a href="/">
<img src="{{asset('images/logo.png')}}" class="logo" alt="">
</a>
</li>
@foreach(\App\Helpers\getMainCats(4) as $mcat)
<li> <li>
<a href="{{route('cat',$mcat->slug)}}"> <a href="{{route('cat',$mcat->slug)}}">
{{$mcat->name}} {{$mcat->name}}
<i class="ri-arrow-drop-left-line"></i>
</a> </a>
<div class="sub-item"> <ul>
<li>
<h3> <h3>
محبوب ترین
{{$mcat->name}} {{$mcat->name}}
ها
</h3> </h3>
<div class="grid">
<div>
<ul> <ul>
@foreach(\App\Helpers\getSubCats($mcat->id) as $subcat) @foreach($mcat->products()->orderby('stock_quantity','desc')->limit(5)->get() as $p)
<li> <li>
<a href="{{route('cat',$subcat->slug)}}"> <a href="{{route('product',$p->slug)}}">
<i class="fa fa-external-link"></i> {{$p->name}}
{{$subcat->name}}
</a> </a>
</li> </li>
@endforeach @endforeach
</ul> </ul>
</div> </li>
<div> <li>
<h3>
{{$mcat->name}}
به تفکیک
</h3>
<ul> <ul>
@foreach(\App\Helpers\getSubCats($mcat->id) as $subcat) @foreach(\App\Helpers\getSubCats($mcat->id) as $subcat)
<li> <li>
<a href="{{route('cat',$subcat->slug)}}"> <a href="{{route('cat',$subcat->slug)}}">
<i class="fa fa-external-link"></i>
{{$subcat->name}} {{$subcat->name}}
</a> </a>
</li> </li>
@endforeach @endforeach
</ul> </ul>
</div> </li>
<div>
<img src="{{$mcat->thumbUrl()}}" class="img-fluid" alt="">
{{-- {{$mcat->description}}--}}
</div>
</div>
</div>
<li class="x-highlight">
<h3>
{{$mcat->name}}
</h3>
<br>
<p>
{{$mcat->description}}
</p>
</li>
<li>
<img src="{{$mcat->thumbUrl()}}" alt="">
</li>
</ul>
</li> </li>
@endforeach @endforeach
{!! \App\Helpers\MenuShowByName('menu') !!}
</ul> </ul>
</div> </nav>
<div id="search-list"></div>

@ -1,317 +1,163 @@
@extends('website.layout.layout') @extends('website.layout.layout')
@section('content') @section('content')
<section id="index-top">
<!-- hero --> <div class="container">
<header id="head-slider" class=" mt-3 container"> <div class="grid">
<div class=" text-center " id="header"> <div class="display-block position-relative">
<div class="row m-0"> <div class="fa fa-mobile-alt fa-bg"></div>
<div class="hero-carousel col-md-12 my-2 order-md-last order-first mt-3"> <h2 class="mt-5 ms-3">
<div id="carouselExampleDark" class="carousel carousel-dark slide container-sm" {{\App\Helpers\getSetting('top1text')}}
data-bs-ride="carousel"> </h2>
<div class="carousel-indicators"> <div class="clearfix mt-5 mb-5"></div>
<button type="button" data-bs-target="#carouselExampleDark" data-bs-slide-to="0" <div id="owl2" class="owl-carousel owl-theme">
class="active" @foreach(\App\Helpers\getProductByCat(\App\Helpers\getSetting('top1cat'),'id','desc',10) as $p)
aria-current="true" aria-label="Slide 1"></button> <div class="item">
<button type="button" data-bs-target="#carouselExampleDark" data-bs-slide-to="1" <div class="box">
aria-label="Slide 2"></button> <a href="{{route('product',$p->slug)}}">
<button type="button" data-bs-target="#carouselExampleDark" data-bs-slide-to="2" <img src="{{$p->thumbUrl()}}" class="img-fluid" alt="{{$p->name}}" title="{{$p->name}}">
aria-label="Slide 3"></button>
<button type="button" data-bs-target="#carouselExampleDark" data-bs-slide-to="3"
aria-label="Slide 4"></button>
<button type="button" data-bs-target="#carouselExampleDark" data-bs-slide-to="4"
aria-label="Slide 5"></button>
</div>
<div class="carousel-inner">
<div class="carousel-item active" data-bs-interval="3000">
<a href="{{\App\Helpers\getSetting('carousel-1-link')}}">
<img src="{{asset('images/carousel/carousel-1.jpg')}}"
class="d-block w-100 "
alt="..."></a>
</div>
<div class="carousel-item" data-bs-interval="3000">
<a href="{{\App\Helpers\getSetting('carousel-2-link')}}">
<img src="{{asset('images/carousel/carousel-2.jpg')}}"
class="d-block w-100"
alt="..."></a>
</div>
<div class="carousel-item" data-bs-interval="3000">
<a href="{{\App\Helpers\getSetting('carousel-3-link')}}">
<img src="{{asset('images/carousel/carousel-3.jpg')}}"
class="d-block w-100"
alt="..."></a>
</div>
<div class="carousel-item" data-bs-interval="3000">
<a href="{{\App\Helpers\getSetting('carousel-4-link')}}">
<img src="{{asset('images/carousel/carousel-4.jpg')}}"
class="d-block w-100"
alt="..."></a>
</div>
<div class="carousel-item" data-bs-interval="3000">
<a href="{{\App\Helpers\getSetting('carousel-5-link')}}">
<img src="{{asset('images/carousel/carousel-5.jpg')}}"
class="d-block w-100 "
alt="..."></a>
</div>
</div>
<button class="carousel-control-next" type="button" data-bs-target="#carouselExampleDark"
data-bs-slide="prev">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleDark"
data-bs-slide="next">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
</div>
<div class="row m-0">
<div class="col-6">
<a href="{{\App\Helpers\getSetting('banner1-link')}}"><img src="{{asset('images/banner1.png')}}" alt=""></a>
</div>
<div class="col-6">
<a href="{{\App\Helpers\getSetting('banner2-link')}}"><img src="{{asset('images/banner2.png')}}" alt=""></a>
</div>
</div>
</div>
</div>
</header>
<!-- hero -->
<!-- banners-->
<section class="banners container mt-3">
<div class="row m-0">
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6 mt-3 mt-sm-3 mt-md-0 ">
<a href="{{\App\Helpers\getSetting('banner3-link')}}"><img src="{{asset('images/banner3.png')}}" alt=""></a>
</div>
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6 mt-3 mt-sm-3 mt-md-0 ">
<a href="{{\App\Helpers\getSetting('banner4-link')}}"><img src="{{asset('images/banner4.png')}}" alt=""></a>
</div>
</div>
</section>
<!-- banners-->
<!-- services-->
<div class="head-services container mt-3">
<div class="row m-0">
@if(\App\Helpers\getSettingCategory('supports') != null)
@foreach(\App\Helpers\getSettingCategory('supports')->posts as $p)
<div class="serv-box col-6 col-sm-6 col-md-6 col-lg-3 col-xl-3">
<a href="{{route('n.show',$p->slug)}}">
<div class="row m-0">
<div class="col-4">
<img src="{{$p->imgUrl()}}" style="max-height: 58px;" alt="">
</div>
<div class="col-8">
<h4> <h4>
{{$p->title}} {{$p->name}}
</h4> </h4>
</a>
<span> <span>
{{$p->subtitle}} {{$p->getPrice()}}
</span> </span>
</div> <a href="{{route('card.add',$p->slug)}}" class="add-to-card btn btn-primary btn-block mt-2 mb-2">
</div> <img src="{{asset('images/basket.svg')}}" class="basket-icon" alt=""> &nbsp;
افزودن به سبد خرید
</a> </a>
</div> </div>
</div>
@endforeach @endforeach
@endif
</div> </div>
</div> </div>
<!-- services--> <div class="position-relative">
@foreach(\App\Helpers\getProductByCat(\App\Helpers\getSetting('top2cat'),'id','desc',2) as $p)
<article>
<a href="{{route('product',$p->slug)}}">
<!-- slider 1--> <img src="{{$p->thumbUrl()}}" alt="{{$p->name}}" title="{{$p->name}}">
<div class="slider-title container mt-4"> <div>
<h5> <div class="text-light">
محصولات آرایشی {{$p->getPrice()}}
</h5>
</div> </div>
<section class="slider container ">
<div class="main-content">
<div class="owl-carousel owl-theme">
@foreach($disPros as $pro)
<div class="item">
<a href="{{route('product',$pro->slug)}}">
<div class="slider-box">
<img src="{{$pro->thumburl()}}" alt="Picture 1">
<h5>
{{$pro->name}}
</h5>
<del>
{{$pro->getOldPrice()}}
</del>
<h6>
{{$pro->getPurePrice()}}
</h6>
<img src="{{asset('images/sale.svg')}}" class="sale-off" alt="">
</div> </div>
</a> </a>
</div> <span class="badge bg-secondary discount">
{{\App\Helpers\getSetting('top2text')}}
</span>
</article>
@endforeach @endforeach
</div>
<div class="owl-theme">
<div class="owl-controls">
<div class="custom-nav owl-nav"></div>
</div>
</div>
</div>
</section>
<!-- slider 1-->
<!-- offer banners mid-->
<div class="offer-mid-banner mt-3 container">
<div class="row m-0">
<div class="col-6">
<a href="{{\App\Helpers\getSetting('offer1-link')}}"><img src="{{asset('images/offer1.png')}}" alt=""></a>
</div>
<div class="col-6">
<a href="{{\App\Helpers\getSetting('offer2-link')}}"><img src="{{asset('images/offer2.png')}}" alt=""></a>
</div>
</div>
</div> </div>
<!-- offer banners mid--> <div class="position-relative">
@foreach(\App\Helpers\getProductByCat(\App\Helpers\getSetting('top3cat'),'id','desc',2) as $p)
<article>
<a href="{{route('product',$p->slug)}}">
<!-- slider 2--> <img src="{{$p->thumbUrl()}}" alt="{{$p->name}}" title="{{$p->name}}">
<div class="slider-title container mt-4"> <div>
<h5> <div class="text-light">
محصولات بهداشتی {{$p->getPrice()}}
</h5>
</div> </div>
<section class="slider container ">
<div class="main-content">
<div class="owl-carousel owl-theme">
<div class="item">
<a href="product.html">
<div class="slider-box">
<img src="assets/img/index/products/p-2.jpeg" alt="Picture 1">
<h5>
نام محصول
</h5>
<del>185.000</del>
<h6>165.200</h6>
<img src="assets/img/sale.svg" class="sale-off" alt="">
</div> </div>
</a> </a>
<span class="badge bg-secondary discount">
{{\App\Helpers\getSetting('top3text')}}
</span>
</article>
@endforeach
</div> </div>
<div class="item">
<a href="product.html">
<div class="slider-box">
<img src="assets/img/index/products/p-1.jpeg" alt="Picture 1">
<h5>
نام محصول
</h5>
<del>185.000</del>
<h6>165.200</h6>
<img src="assets/img/sale.svg" class="sale-off" alt="">
</div> </div>
</a>
</div>
<div class="item">
<a href="product.html">
<div class="slider-box">
<img src="assets/img/index/products/p-3.jpeg" alt="Picture 1">
<h5>
نام محصول
</h5>
<del>185.000</del>
<h6>165.200</h6>
<img src="assets/img/sale.svg" class="sale-off" alt="">
</div> </div>
</section>
<section id="new-products" class="mt-5 long-box">
<div class="container pt-4 pb-4">
<h1 class="mb-4">
{{\App\Helpers\getSetting('sectext')}}
</h1>
<div id="owl1" class="owl-carousel owl-theme">
@foreach(\App\Helpers\getProductByCat(\App\Helpers\getSetting('seccat'),'id','desc',10) as $p)
<div class="item ">
<div class="box">
<a href="{{route('product',$p->slug)}}">
<img src="{{$p->thumbUrl()}}" class="img-fluid" alt="{{$p->name}}" title="{{$p->name}}">
</a> </a>
</div> <a href="{{route('product',$p->slug)}}">
<div class="item"> <h4>
<a href="product.html"> {{$p->name}}
<div class="slider-box"> </h4>
<img src="assets/img/index/products/p-4.jpeg" alt="Picture 1"> <span>
<h5> {{$p->getPrice()}}
نام محصول </span>
</h5> </a>
<del>185.000</del> <div>
<h6>165.200</h6> <a href="{{route('card.add',$p->slug)}}" class="add-to-card btn btn-primary btn-block mt-2 mb-2 corner">
<img src="assets/img/sale.svg" class="sale-off" alt=""> <img src="{{asset('images/basket.svg')}}" class="basket-icon" alt=""> &nbsp;
</div> افزودن به سبد خرید
</a> </a>
</div>
</div>
<div class="owl-theme">
<div class="owl-controls">
<div class="custom-nav owl-nav"></div>
</div> </div>
</div> </div>
</div> </div>
</section> @endforeach
<!-- slider 2-->
<!-- slider 3-->
<div class="slider-title container mt-4">
<h5>
محصولات بهداشت بدن
</h5>
</div>
<section class="slider container ">
<div class="main-content">
<div class="owl-carousel owl-theme">
<div class="item">
<a href="product.html">
<div class="slider-box">
<img src="assets/img/index/products/p-2.jpeg" alt="Picture 1">
<h5>
نام محصول
</h5>
<del>185.000</del>
<h6>165.200</h6>
<img src="assets/img/sale.svg" class="sale-off" alt="">
</div> </div>
<a href="{{route('products')}}" class="float-end btn btn-outline-primary">
همه محصولات
</a> </a>
<br>
<br>
</div> </div>
<div class="item"> </section>
<a href="product.html"> <section id="filtering" class="pb-4 pt-4 bg long-box">
<div class="slider-box"> <div class="container">
<img src="assets/img/index/products/p-1.jpeg" alt="Picture 1"> <h1>
<h5> {{\App\Helpers\getSetting('3text')}}
نام محصول </h1>
</h5> <div class="btn-group mt-3" role="group" aria-label="Basic example">
<del>185.000</del> <button type="button" class="btn btn-primary active" data-cat="all">همه</button>
<h6>165.200</h6> @foreach(\App\Helpers\getSubCats(\App\Helpers\getSetting('3cat')) as $cat)
<img src="assets/img/sale.svg" class="sale-off" alt=""> <button type="button" class="btn btn-primary" data-cat="cat{{$cat->id}}">
{{$cat->name}}
</button>
@endforeach
</div> </div>
<div id="da-thumbs" class="da-thumbs">
@foreach(\App\Helpers\getProductByCat(\App\Helpers\getSetting('3cat'),'stock_quantity','desc',12) as $p)
<div class="item custom @foreach($p->categories()->pluck('id')->toArray() as $c) cat{{$c}} @endforeach shad pad">
<div class="box">
<a href="{{route('product',$p->slug)}}">
<img src="{{$p->thumbUrl()}}" class="img-fluid" alt="{{$p->name}}" title="{{$p->name}}" >
<h4>
{{$p->name}}
</h4>
</a> </a>
<span>
{{$p->getPrice()}}
</span>
</div> </div>
<div class="item">
<a href="product.html">
<div class="slider-box">
<img src="assets/img/index/products/p-3.jpeg" alt="Picture 1">
<h5>
نام محصول
</h5>
<del>185.000</del>
<h6>165.200</h6>
<img src="assets/img/sale.svg" class="sale-off" alt="">
</div> </div>
</a> @endforeach
</div> </div>
<div class="item">
<a href="product.html">
<div class="slider-box">
<img src="assets/img/index/products/p-4.jpeg" alt="Picture 1">
<h5>
نام محصول
</h5>
<del>185.000</del>
<h6>165.200</h6>
<img src="assets/img/sale.svg" class="sale-off" alt="">
</div> </div>
</section>
<section id="brand" class="pt-4 pb-4">
<div class="container">
<h1>
برندها
</h1>
<div class="row">
@foreach(\App\Helpers\getSubCats(\App\Helpers\getSetting('4cat')) as $cat)
<div class="col-md-2 col-sm-3 col-4">
<a href="{{route('cat',$cat->slug)}}">
<img src="{{$cat->thumbUrl()}}" title="{{$cat->name}}" alt="{{$cat->name}}">
</a> </a>
</div> </div>
</div> @endforeach
<div class="owl-theme">
<div class="owl-controls">
<div class="custom-nav owl-nav"></div>
</div>
</div> </div>
</div> </div>
</section> </section>
<!-- slider 3-->
@endsection @endsection

@ -1,10 +1,6 @@
@include('website.component.header') @include('website.component.header')
<div id="preloader"> <div id="main-container" class="@yield('body-class')">
<img src="{{asset('images/preloader.gif')}}" alt="">
</div>
<div class="@yield('body-class')">
<div id="app"> <div id="app">
@yield('content') @yield('content')
</div> </div>

Loading…
Cancel
Save