├── public ├── css │ └── app.css ├── favicon.ico ├── robots.txt ├── mix-manifest.json ├── backend │ ├── dropzone │ │ ├── index.js │ │ ├── .gitignore │ │ ├── CONTRIBUTING.md │ │ ├── component.json │ │ ├── composer.json │ │ ├── bower.json │ │ ├── dist │ │ │ ├── min │ │ │ │ └── basic.min.css │ │ │ └── basic.css │ │ ├── .tagconfig │ │ ├── package.json │ │ ├── LICENSE │ │ └── README.md │ └── js │ │ ├── main.js │ │ └── plugins │ │ ├── dataTables.bootstrap.min.js │ │ └── jquery.vmap.sampledata.js ├── images │ ├── avatar_fmale.jpg │ └── avatar_male.png ├── frontend │ ├── images │ │ ├── logo.png │ │ ├── favicon.ico │ │ ├── items │ │ │ ├── 1.jpg │ │ │ ├── 2.jpg │ │ │ ├── 3.jpg │ │ │ ├── 4.jpg │ │ │ ├── 5.jpg │ │ │ ├── 6.jpg │ │ │ ├── 7.jpg │ │ │ ├── item-sm.jpg │ │ │ └── item-sm.png │ │ ├── posts │ │ │ ├── 1.jpg │ │ │ ├── 2.jpg │ │ │ ├── 3.jpg │ │ │ ├── 4.jpg │ │ │ ├── 5.jpg │ │ │ └── 6.jpg │ │ ├── logos │ │ │ ├── logo1.png │ │ │ ├── logo2.png │ │ │ ├── logo3.png │ │ │ ├── logo4.png │ │ │ ├── logo5.png │ │ │ └── logo-alibaba.png │ │ └── icons │ │ │ ├── flag-in.png │ │ │ ├── flag-kr.png │ │ │ ├── flag-tr.png │ │ │ ├── flag-vt.png │ │ │ ├── flag-usa.png │ │ │ ├── pay-bank.png │ │ │ ├── pay-visa.png │ │ │ ├── rating-2.png │ │ │ ├── rating-3.png │ │ │ ├── rating-4.png │ │ │ ├── rating-5.png │ │ │ ├── pay-visa-el.png │ │ │ ├── pay-american-ex.png │ │ │ └── pay-mastercard.png │ ├── fonts │ │ ├── roboto │ │ │ ├── Roboto-Bold.ttf │ │ │ ├── Roboto-Light.ttf │ │ │ ├── Roboto-Thin.ttf │ │ │ ├── Roboto-Medium.ttf │ │ │ ├── Roboto-Regular.ttf │ │ │ └── font.css │ │ ├── fontawesome │ │ │ ├── webfonts │ │ │ │ ├── fa-brands-400.eot │ │ │ │ ├── fa-brands-400.ttf │ │ │ │ ├── fa-solid-900.eot │ │ │ │ ├── fa-solid-900.ttf │ │ │ │ ├── fa-solid-900.woff │ │ │ │ ├── fa-brands-400.woff │ │ │ │ ├── fa-brands-400.woff2 │ │ │ │ ├── fa-regular-400.eot │ │ │ │ ├── fa-regular-400.ttf │ │ │ │ ├── fa-regular-400.woff │ │ │ │ ├── fa-regular-400.woff2 │ │ │ │ └── fa-solid-900.woff2 │ │ │ ├── scss │ │ │ │ ├── _fixed-width.scss │ │ │ │ ├── _screen-reader.scss │ │ │ │ ├── v4-shims.scss │ │ │ │ ├── _animated.scss │ │ │ │ ├── _list.scss │ │ │ │ ├── _core.scss │ │ │ │ ├── _larger.scss │ │ │ │ ├── fontawesome.scss │ │ │ │ ├── _bordered-pulled.scss │ │ │ │ ├── _stacked.scss │ │ │ │ ├── solid.scss │ │ │ │ ├── brands.scss │ │ │ │ ├── regular.scss │ │ │ │ ├── _rotated-flipped.scss │ │ │ │ └── _mixins.scss │ │ │ └── css │ │ │ │ ├── solid.min.css │ │ │ │ ├── brands.min.css │ │ │ │ ├── regular.min.css │ │ │ │ ├── brands.css │ │ │ │ ├── solid.css │ │ │ │ └── regular.css │ │ └── material-icons │ │ │ ├── MaterialIcons-Regular.eot │ │ │ ├── MaterialIcons-Regular.ttf │ │ │ ├── MaterialIcons-Regular.woff │ │ │ ├── MaterialIcons-Regular.woff2 │ │ │ └── material-icons.css │ ├── plugins │ │ ├── slickslider │ │ │ ├── ajax-loader.gif │ │ │ ├── fonts │ │ │ │ ├── slick.eot │ │ │ │ ├── slick.ttf │ │ │ │ ├── slick.woff │ │ │ │ └── slick.svg │ │ │ └── slick.css │ │ └── owlcarousel │ │ │ └── assets │ │ │ ├── ajax-loader.gif │ │ │ ├── owl.video.play.png │ │ │ ├── owl.theme.default.min.css │ │ │ ├── owl.theme.green.min.css │ │ │ ├── owl.theme.green.css │ │ │ └── owl.theme.default.css │ ├── css │ │ └── responsive.css │ └── js │ │ └── script.js ├── .htaccess └── index.php ├── resources ├── sass │ └── app.scss ├── views │ ├── site │ │ ├── partials │ │ │ ├── scripts.blade.php │ │ │ ├── styles.blade.php │ │ │ └── nav.blade.php │ │ ├── app.blade.php │ │ └── pages │ │ │ └── category.blade.php │ └── admin │ │ ├── app.blade.php │ │ ├── partials │ │ ├── flash.blade.php │ │ └── sidebar.blade.php │ │ ├── settings │ │ ├── includes │ │ │ ├── analytics.blade.php │ │ │ ├── footer_seo.blade.php │ │ │ └── logo.blade.php │ │ └── index.blade.php │ │ ├── brands │ │ ├── create.blade.php │ │ ├── index.blade.php │ │ └── edit.blade.php │ │ ├── attributes │ │ └── index.blade.php │ │ └── products │ │ └── index.blade.php ├── lang │ └── en │ │ ├── pagination.php │ │ ├── auth.php │ │ └── passwords.php └── js │ └── app.js ├── bootstrap ├── cache │ └── .gitignore └── app.php ├── storage ├── logs │ └── .gitignore ├── app │ ├── public │ │ └── .gitignore │ └── .gitignore └── framework │ ├── testing │ └── .gitignore │ ├── views │ └── .gitignore │ ├── cache │ ├── data │ │ └── .gitignore │ └── .gitignore │ ├── sessions │ └── .gitignore │ └── .gitignore ├── database ├── .gitignore ├── seeds │ ├── BrandsTableSeeder.php │ ├── AdminsTableSeeder.php │ ├── DatabaseSeeder.php │ ├── AttributesTableSeeder.php │ ├── AttributeValuesTableSeeder.php │ ├── CategoriesTableSeeder.php │ └── SettingsTableSeeder.php ├── factories │ ├── BrandFactory.php │ ├── CategoryFactory.php │ └── UserFactory.php └── migrations │ ├── 2020_08_19_043703_create_settings_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2020_08_31_080658_create_brands_table.php │ ├── 2020_08_09_065345_create_admins_table.php │ ├── 2020_08_23_054953_create_attribute_values_table.php │ ├── 2020_09_01_084710_product_categories.php │ ├── 2020_09_01_073044_create_product_images_table.php │ ├── 2020_08_23_045907_create_attributes_table.php │ ├── 2020_08_20_054720_create_categories_table.php │ ├── 2020_09_17_044028_create_order_items_table.php │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2020_09_01_081000_create_product_attributes_table.php │ ├── 2020_09_01_063940_create_products_table.php │ └── 2020_09_17_042632_create_orders_table.php ├── Procfile ├── .gitattributes ├── tests ├── TestCase.php ├── Unit │ └── ExampleTest.php ├── Feature │ └── ExampleTest.php └── CreatesApplication.php ├── .gitignore ├── app ├── Contracts │ ├── OrderContract.php │ ├── BrandContract.php │ ├── AttributeContract.php │ ├── ProductContract.php │ ├── CategoryContract.php │ └── BaseContract.php ├── Http │ ├── Middleware │ │ ├── EncryptCookies.php │ │ ├── VerifyCsrfToken.php │ │ ├── CheckForMaintenanceMode.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── TrustProxies.php │ │ ├── Authenticate.php │ │ └── RedirectIfAuthenticated.php │ ├── Controllers │ │ ├── Auth │ │ │ ├── LoginController.php │ │ │ └── RegisterController.php │ │ ├── Controller.php │ │ ├── Site │ │ │ ├── CategoryController.php │ │ │ ├── CartController.php │ │ │ ├── CheckoutController.php │ │ │ └── ProductController.php │ │ └── Admin │ │ │ ├── LoginController.php │ │ │ ├── SettingController.php │ │ │ ├── AttributeValueController.php │ │ │ └── ProductAttributeController.php │ └── Requests │ │ └── ProductFormValidate.php ├── Models │ ├── OrderItem.php │ ├── ProductImage.php │ ├── Brand.php │ ├── Order.php │ ├── ProductAttribute.php │ ├── AttributeValue.php │ ├── Attribute.php │ ├── Admin.php │ ├── Category.php │ ├── User.php │ ├── Setting.php │ └── Product.php ├── Providers │ ├── BroadcastServiceProvider.php │ ├── ViewComposerServiceProvider.php │ ├── AuthServiceProvider.php │ ├── AppServiceProvider.php │ ├── EventServiceProvider.php │ ├── SettingServiceProvider.php │ ├── RepositoryServiceProvider.php │ └── RouteServiceProvider.php ├── Traits │ ├── UploadAble.php │ └── FlashMessages.php ├── Console │ └── Kernel.php ├── Repositories │ ├── OrderRepository.php │ └── BrandRepository.php └── Exceptions │ └── Handler.php ├── .styleci.yml ├── .editorconfig ├── nginx.conf ├── webpack.mix.js ├── routes ├── channels.php ├── api.php ├── console.php └── web.php ├── server.php ├── config ├── cors.php ├── services.php ├── view.php ├── hashing.php └── broadcasting.php ├── .env.example ├── package.json ├── phpunit.xml ├── artisan ├── composer.json └── README.md /public/css/app.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/sass/app.scss: -------------------------------------------------------------------------------- 1 | // 2 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | *.sqlite-journal 3 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: vendor/bin/heroku-php-nginx -C nginx.conf public/ -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /public/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/backend/js/app.js": "/backend/js/app.js" 3 | } 4 | -------------------------------------------------------------------------------- /public/backend/dropzone/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./dist/dropzone.js"); // Exposing dropzone 2 | -------------------------------------------------------------------------------- /public/images/avatar_fmale.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/images/avatar_fmale.jpg -------------------------------------------------------------------------------- /public/images/avatar_male.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/images/avatar_male.png -------------------------------------------------------------------------------- /public/frontend/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/logo.png -------------------------------------------------------------------------------- /public/frontend/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/favicon.ico -------------------------------------------------------------------------------- /public/frontend/images/items/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/items/1.jpg -------------------------------------------------------------------------------- /public/frontend/images/items/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/items/2.jpg -------------------------------------------------------------------------------- /public/frontend/images/items/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/items/3.jpg -------------------------------------------------------------------------------- /public/frontend/images/items/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/items/4.jpg -------------------------------------------------------------------------------- /public/frontend/images/items/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/items/5.jpg -------------------------------------------------------------------------------- /public/frontend/images/items/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/items/6.jpg -------------------------------------------------------------------------------- /public/frontend/images/items/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/items/7.jpg -------------------------------------------------------------------------------- /public/frontend/images/posts/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/posts/1.jpg -------------------------------------------------------------------------------- /public/frontend/images/posts/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/posts/2.jpg -------------------------------------------------------------------------------- /public/frontend/images/posts/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/posts/3.jpg -------------------------------------------------------------------------------- /public/frontend/images/posts/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/posts/4.jpg -------------------------------------------------------------------------------- /public/frontend/images/posts/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/posts/5.jpg -------------------------------------------------------------------------------- /public/frontend/images/posts/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/posts/6.jpg -------------------------------------------------------------------------------- /public/backend/dropzone/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | components 3 | node_modules 4 | .DS_Store 5 | .sass-cache 6 | _site 7 | _config.yaml -------------------------------------------------------------------------------- /public/frontend/images/logos/logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/logos/logo1.png -------------------------------------------------------------------------------- /public/frontend/images/logos/logo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/logos/logo2.png -------------------------------------------------------------------------------- /public/frontend/images/logos/logo3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/logos/logo3.png -------------------------------------------------------------------------------- /public/frontend/images/logos/logo4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/logos/logo4.png -------------------------------------------------------------------------------- /public/frontend/images/logos/logo5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/logos/logo5.png -------------------------------------------------------------------------------- /public/frontend/images/icons/flag-in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/icons/flag-in.png -------------------------------------------------------------------------------- /public/frontend/images/icons/flag-kr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/icons/flag-kr.png -------------------------------------------------------------------------------- /public/frontend/images/icons/flag-tr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/icons/flag-tr.png -------------------------------------------------------------------------------- /public/frontend/images/icons/flag-vt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/icons/flag-vt.png -------------------------------------------------------------------------------- /public/frontend/images/items/item-sm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/items/item-sm.jpg -------------------------------------------------------------------------------- /public/frontend/images/items/item-sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/items/item-sm.png -------------------------------------------------------------------------------- /public/frontend/images/icons/flag-usa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/icons/flag-usa.png -------------------------------------------------------------------------------- /public/frontend/images/icons/pay-bank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/icons/pay-bank.png -------------------------------------------------------------------------------- /public/frontend/images/icons/pay-visa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/icons/pay-visa.png -------------------------------------------------------------------------------- /public/frontend/images/icons/rating-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/icons/rating-2.png -------------------------------------------------------------------------------- /public/frontend/images/icons/rating-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/icons/rating-3.png -------------------------------------------------------------------------------- /public/frontend/images/icons/rating-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/icons/rating-4.png -------------------------------------------------------------------------------- /public/frontend/images/icons/rating-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/icons/rating-5.png -------------------------------------------------------------------------------- /public/frontend/fonts/roboto/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/fonts/roboto/Roboto-Bold.ttf -------------------------------------------------------------------------------- /public/frontend/fonts/roboto/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/fonts/roboto/Roboto-Light.ttf -------------------------------------------------------------------------------- /public/frontend/fonts/roboto/Roboto-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/fonts/roboto/Roboto-Thin.ttf -------------------------------------------------------------------------------- /public/frontend/images/icons/pay-visa-el.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/icons/pay-visa-el.png -------------------------------------------------------------------------------- /public/frontend/images/logos/logo-alibaba.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/logos/logo-alibaba.png -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /public/frontend/fonts/roboto/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/fonts/roboto/Roboto-Medium.ttf -------------------------------------------------------------------------------- /public/frontend/fonts/roboto/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/fonts/roboto/Roboto-Regular.ttf -------------------------------------------------------------------------------- /public/frontend/images/icons/pay-american-ex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/icons/pay-american-ex.png -------------------------------------------------------------------------------- /public/frontend/images/icons/pay-mastercard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/images/icons/pay-mastercard.png -------------------------------------------------------------------------------- /public/frontend/plugins/slickslider/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/plugins/slickslider/ajax-loader.gif -------------------------------------------------------------------------------- /public/frontend/plugins/slickslider/fonts/slick.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/plugins/slickslider/fonts/slick.eot -------------------------------------------------------------------------------- /public/frontend/plugins/slickslider/fonts/slick.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/plugins/slickslider/fonts/slick.ttf -------------------------------------------------------------------------------- /public/frontend/plugins/slickslider/fonts/slick.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/plugins/slickslider/fonts/slick.woff -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | config.php 2 | routes.php 3 | schedule-* 4 | compiled.php 5 | services.json 6 | events.scanned.php 7 | routes.scanned.php 8 | down 9 | -------------------------------------------------------------------------------- /public/frontend/plugins/owlcarousel/assets/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/plugins/owlcarousel/assets/ajax-loader.gif -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/webfonts/fa-brands-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/fonts/fontawesome/webfonts/fa-brands-400.eot -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/fonts/fontawesome/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/webfonts/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/fonts/fontawesome/webfonts/fa-solid-900.eot -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/fonts/fontawesome/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/webfonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/fonts/fontawesome/webfonts/fa-solid-900.woff -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/webfonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/fonts/fontawesome/webfonts/fa-brands-400.woff -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/fonts/fontawesome/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/webfonts/fa-regular-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/fonts/fontawesome/webfonts/fa-regular-400.eot -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/fonts/fontawesome/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/webfonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/fonts/fontawesome/webfonts/fa-regular-400.woff -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/fonts/fontawesome/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/fonts/fontawesome/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /public/frontend/fonts/material-icons/MaterialIcons-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/fonts/material-icons/MaterialIcons-Regular.eot -------------------------------------------------------------------------------- /public/frontend/fonts/material-icons/MaterialIcons-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/fonts/material-icons/MaterialIcons-Regular.ttf -------------------------------------------------------------------------------- /public/frontend/fonts/material-icons/MaterialIcons-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/fonts/material-icons/MaterialIcons-Regular.woff -------------------------------------------------------------------------------- /public/frontend/plugins/owlcarousel/assets/owl.video.play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/plugins/owlcarousel/assets/owl.video.play.png -------------------------------------------------------------------------------- /public/frontend/fonts/material-icons/MaterialIcons-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bounceru/ecmproj/HEAD/public/frontend/fonts/material-icons/MaterialIcons-Regular.woff2 -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | text-align: center; 5 | width: $fa-fw-width; 6 | } 7 | -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/scss/_screen-reader.scss: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { @include sr-only; } 5 | .sr-only-focusable { @include sr-only-focusable; } 6 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /database/seeds/BrandsTableSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | belongsTo(Product::class, 'product_id'); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | define(Brand::class, function (Faker $faker) { 9 | $brands = ['Nestle', 'PepsiCo, Inc', 'Unilever', 'Pran', 'Halal']; 10 | 11 | return [ 12 | 'name' => $faker->unique()->randomElement($brands) 13 | ]; 14 | 15 | }); 16 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | middleware('guest')->except('logout'); 16 | } 17 | } -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/scss/_animated.scss: -------------------------------------------------------------------------------- 1 | // Animated Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | animation: fa-spin 2s infinite linear; 6 | } 7 | 8 | .#{$fa-css-prefix}-pulse { 9 | animation: fa-spin 1s infinite steps(8); 10 | } 11 | 12 | @keyframes fa-spin { 13 | 0% { 14 | transform: rotate(0deg); 15 | } 16 | 17 | 100% { 18 | transform: rotate(360deg); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | li { position: relative; } 10 | } 11 | 12 | .#{$fa-css-prefix}-li { 13 | left: -$fa-li-width; 14 | position: absolute; 15 | text-align: center; 16 | width: $fa-li-width; 17 | line-height: inherit; 18 | } 19 | -------------------------------------------------------------------------------- /app/Http/Middleware/CheckForMaintenanceMode.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}, 5 | .fas, 6 | .far, 7 | .fal, 8 | .fad, 9 | .fab { 10 | -moz-osx-font-smoothing: grayscale; 11 | -webkit-font-smoothing: antialiased; 12 | display: inline-block; 13 | font-style: normal; 14 | font-variant: normal; 15 | text-rendering: auto; 16 | line-height: 1; 17 | } 18 | 19 | %fa-icon { 20 | @include fa-icon; 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustHosts.php: -------------------------------------------------------------------------------- 1 | allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Models/ProductImage.php: -------------------------------------------------------------------------------- 1 | 'integer', 15 | ]; 16 | 17 | public function product(){ 18 | // $images->product 19 | return $this->belongsTo(Product::class); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /public/backend/dropzone/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "enyo/dropzone", 3 | "description": "Handles drag and drop of files for you.", 4 | "homepage": "http://www.dropzonejs.com", 5 | "keywords": [ 6 | "dragndrop", 7 | "drag and drop", 8 | "file upload", 9 | "upload" 10 | ], 11 | "authors": [{ 12 | "name": "Matias Meno", 13 | "email": "m@tias.me", 14 | "homepage": "http://www.matiasmeno.com" 15 | }], 16 | "license": "MIT", 17 | "minimum-stability": "dev" 18 | } 19 | -------------------------------------------------------------------------------- /public/backend/dropzone/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dropzone", 3 | "location": "enyo/dropzone", 4 | "version": "5.7.0", 5 | "description": "Dropzone is an easy to use drag'n'drop library. It supports image previews and shows nice progress bars.", 6 | "homepage": "http://www.dropzonejs.com", 7 | "main": [ 8 | "dist/min/dropzone.min.css", 9 | "dist/min/dropzone.min.js" 10 | ], 11 | "ignore": [ 12 | "*", 13 | "!dist", 14 | "!dist/**/*" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/scss/fontawesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | @import 'variables'; 6 | @import 'mixins'; 7 | @import 'core'; 8 | @import 'larger'; 9 | @import 'fixed-width'; 10 | @import 'list'; 11 | @import 'bordered-pulled'; 12 | @import 'animated'; 13 | @import 'rotated-flipped'; 14 | @import 'stacked'; 15 | @import 'icons'; 16 | @import 'screen-reader'; 17 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel application. By default, we are compiling the Sass 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | mix.js('resources/js/app.js', 'public/backend/js'); -------------------------------------------------------------------------------- /app/Models/Brand.php: -------------------------------------------------------------------------------- 1 | attributes['name'] = $value; 16 | $this->attributes['slug'] = Str::slug($value); 17 | } 18 | 19 | public function products(){ 20 | // $brand->products 21 | return $this->hasMany(Product::class); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/seeds/AdminsTableSeeder.php: -------------------------------------------------------------------------------- 1 | k $faker->name, 20 | 'email' => 'admin@admin.com', 21 | 'password' => bcrypt('password') 22 | ]); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 18 | return route('login'); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /public/frontend/fonts/roboto/font.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Roboto"; 3 | src: url(Roboto-Thin.ttf); 4 | font-weight: 200; } 5 | @font-face { 6 | font-family: "Roboto"; 7 | src: url(Roboto-Light.ttf); 8 | font-weight: 300; } 9 | @font-face { 10 | font-family: "Roboto"; 11 | src: url(Roboto-Regular.ttf); 12 | font-weight: 400; } 13 | @font-face { 14 | font-family: "Roboto"; 15 | src: url(Roboto-Medium.ttf); 16 | font-weight: 500; } 17 | @font-face { 18 | font-family: "Roboto"; 19 | src: url(Roboto-Bold.ttf); 20 | font-weight: 700; } 21 | /* 22 | font-family: "Roboto", sans-serif; 23 | */ -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /resources/views/site/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @yield('title') - {{ config('app.name') }} 8 | 9 | @include('site.partials.styles') 10 | 11 | 12 | 13 | @include('site.partials.header') 14 | @include('site.partials.nav') 15 | @yield('content') 16 | @include('site.partials.footer') 17 | 18 | 19 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 18 | return $request->user(); 19 | }); 20 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UserSeeder::class); 15 | $this->call(AdminsTableSeeder::class); 16 | $this->call(SettingsTableSeeder::class); 17 | $this->call(CategoriesTableSeeder::class); 18 | $this->call(AttributesTableSeeder::class); 19 | $this->call(AttributeValuesTableSeeder::class); 20 | $this->call(BrandsTableSeeder::class); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->describe('Display an inspiring quote'); 20 | -------------------------------------------------------------------------------- /database/factories/CategoryFactory.php: -------------------------------------------------------------------------------- 1 | define(Category::class, function (Faker $faker) { 9 | 10 | $categories = [ 11 | 12 | 'Branded Foods', 'Households', 'Veggies & Fruits', 'Kitchen', 'Brand & Bakery' 13 | ]; 14 | foreach($categories as $category){ 15 | 16 | return [ 17 | 'name' => trim(strtolower($category)), 18 | 'description' => $faker->realText(100), 19 | 'parent_id' => 1, 20 | 'menu' => 1, 21 | ]; 22 | 23 | $this->command->info('Inserted'. count($categories). 'records'); 24 | } 25 | 26 | }); 27 | -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | display: inline-block; 6 | height: 2em; 7 | line-height: 2em; 8 | position: relative; 9 | vertical-align: middle; 10 | width: ($fa-fw-width*2); 11 | } 12 | 13 | .#{$fa-css-prefix}-stack-1x, 14 | .#{$fa-css-prefix}-stack-2x { 15 | left: 0; 16 | position: absolute; 17 | text-align: center; 18 | width: 100%; 19 | } 20 | 21 | .#{$fa-css-prefix}-stack-1x { 22 | line-height: inherit; 23 | } 24 | 25 | .#{$fa-css-prefix}-stack-2x { 26 | font-size: 2em; 27 | } 28 | 29 | .#{$fa-css-prefix}-inverse { 30 | color: $fa-inverse; 31 | } 32 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/css/solid.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | @font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:900;font-display:block;src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.fas{font-family:"Font Awesome 5 Free";font-weight:900} -------------------------------------------------------------------------------- /app/Models/Order.php: -------------------------------------------------------------------------------- 1 | belongsTo(User::class, 'user_id'); 31 | } 32 | 33 | public function items(){ 34 | return $this->hasMany(OrderItem::class); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/css/brands.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | @font-face{font-family:"Font Awesome 5 Brands";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-brands-400.eot);src:url(../webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.woff) format("woff"),url(../webfonts/fa-brands-400.ttf) format("truetype"),url(../webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:"Font Awesome 5 Brands";font-weight:400} -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /app/Providers/ViewComposerServiceProvider.php: -------------------------------------------------------------------------------- 1 | with('categories', Category::orderByRaw('-name ASC')->get()->nest()); 15 | $view->with('categories', Category::orderByRaw('name ASC')->get()->nest()); 16 | 17 | }); 18 | 19 | View::composer('site.partials.header', function($view){ 20 | $view->with('cartCount', Cart::getContent()->count()); 21 | 22 | }); 23 | } 24 | } -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/css/regular.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | @font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-regular-400.eot);src:url(../webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"),url(../webfonts/fa-regular-400.ttf) format("truetype"),url(../webfonts/fa-regular-400.svg#fontawesome) format("svg")}.far{font-family:"Font Awesome 5 Free";font-weight:400} -------------------------------------------------------------------------------- /app/Contracts/BrandContract.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Contracts/AttributeContract.php: -------------------------------------------------------------------------------- 1 | categoryRepository = $categoryRepository; 16 | } 17 | 18 | public function show($slug){ 19 | \Log::info("Req=CategoryController@show called"); 20 | $category = $this->categoryRepository->findBySlug($slug); 21 | return view('site.pages.category', compact('category')); 22 | } 23 | } -------------------------------------------------------------------------------- /app/Models/ProductAttribute.php: -------------------------------------------------------------------------------- 1 | product 17 | return $this->belongsTo(Product::class); 18 | } 19 | 20 | public function attributesValues(){ 21 | return $this->belongsToMany(AttributeValue::class); 22 | } 23 | 24 | 25 | /** 26 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo 27 | */ 28 | public function attribute(){ 29 | return $this->belongsTo(Attribute::class); 30 | } 31 | } 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | 28 | if(config('app.env') === 'production') { 29 | \URL::forceScheme('https'); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Contracts/ProductContract.php: -------------------------------------------------------------------------------- 1 | back()->with('message', 'Item removed from cart successfully.'); 22 | } 23 | 24 | public function clearCart(){ 25 | \Log::info("Req=CartController@clearCart called"); 26 | Cart::clear(); 27 | return redirect('/'); 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /app/Models/AttributeValue.php: -------------------------------------------------------------------------------- 1 | 'integer' 28 | ]; 29 | 30 | 31 | /** 32 | * @return \Illuminte\Databasae\Eloquent\Relations\BelongsTo 33 | */ 34 | public function attribute(){ 35 | return $this->belongsTo(Attribute::class); 36 | } 37 | 38 | public function productAttributes(){ 39 | return $this->belongsToMany(ProductAttribute::class); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /database/seeds/AttributesTableSeeder.php: -------------------------------------------------------------------------------- 1 | 'size', 18 | 'name' => 'size', 19 | 'frontend_type' => 'select', 20 | 'is_filterable' => 1, 21 | 'is_required' => 1 22 | ]); 23 | 24 | // Create a color attribute 25 | Attribute::create([ 26 | 'code' => 'color', 27 | 'name' => 'color', 28 | 'frontend_type' => 'select', 29 | 'is_filterable' => 1, 30 | 'is_required' => 1 31 | ]); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Models/Attribute.php: -------------------------------------------------------------------------------- 1 | 'boolean', 26 | 'is_required' => 'boolean' 27 | ]; 28 | 29 | /** 30 | * @return \Illuminate\Database\Eloquent\Relations\HasMany 31 | */ 32 | public function values(){ 33 | // $attribute->values 34 | return $this->hasMany(AttributeValue::class); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/css/brands.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | @font-face { 6 | font-family: 'Font Awesome 5 Brands'; 7 | font-style: normal; 8 | font-weight: 400; 9 | font-display: block; 10 | src: url("../webfonts/fa-brands-400.eot"); 11 | src: url("../webfonts/fa-brands-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.woff") format("woff"), url("../webfonts/fa-brands-400.ttf") format("truetype"), url("../webfonts/fa-brands-400.svg#fontawesome") format("svg"); } 12 | 13 | .fab { 14 | font-family: 'Font Awesome 5 Brands'; 15 | font-weight: 400; } 16 | -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/css/solid.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | @font-face { 6 | font-family: 'Font Awesome 5 Free'; 7 | font-style: normal; 8 | font-weight: 900; 9 | font-display: block; 10 | src: url("../webfonts/fa-solid-900.eot"); 11 | src: url("../webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.woff") format("woff"), url("../webfonts/fa-solid-900.ttf") format("truetype"), url("../webfonts/fa-solid-900.svg#fontawesome") format("svg"); } 12 | 13 | .fa, 14 | .fas { 15 | font-family: 'Font Awesome 5 Free'; 16 | font-weight: 900; } 17 | -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/css/regular.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | @font-face { 6 | font-family: 'Font Awesome 5 Free'; 7 | font-style: normal; 8 | font-weight: 400; 9 | font-display: block; 10 | src: url("../webfonts/fa-regular-400.eot"); 11 | src: url("../webfonts/fa-regular-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.woff") format("woff"), url("../webfonts/fa-regular-400.ttf") format("truetype"), url("../webfonts/fa-regular-400.svg#fontawesome") format("svg"); } 12 | 13 | .far { 14 | font-family: 'Font Awesome 5 Free'; 15 | font-weight: 400; } 16 | -------------------------------------------------------------------------------- /public/backend/js/main.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | 4 | var treeviewMenu = $('.app-menu'); 5 | 6 | // Toggle Sidebar 7 | $('[data-toggle="sidebar"]').click(function(event) { 8 | event.preventDefault(); 9 | $('.app').toggleClass('sidenav-toggled'); 10 | }); 11 | 12 | // Activate sidebar treeview toggle 13 | $("[data-toggle='treeview']").click(function(event) { 14 | event.preventDefault(); 15 | if(!$(this).parent().hasClass('is-expanded')) { 16 | treeviewMenu.find("[data-toggle='treeview']").parent().removeClass('is-expanded'); 17 | } 18 | $(this).parent().toggleClass('is-expanded'); 19 | }); 20 | 21 | // Set initial active toggle 22 | $("[data-toggle='treeview.'].is-expanded").parent().toggleClass('is-expanded'); 23 | 24 | //Activate bootstrip tooltips 25 | $("[data-toggle='tooltip']").tooltip(); 26 | 27 | })(); 28 | -------------------------------------------------------------------------------- /database/seeds/AttributeValuesTableSeeder.php: -------------------------------------------------------------------------------- 1 | 1, 21 | 'value' => $size, 22 | 'price' => null 23 | 24 | ]); 25 | } 26 | 27 | foreach($colors as $color){ 28 | AttributeValue::create([ 29 | 'attribute_id' => 2, 30 | 'value' => $color, 31 | 'price' => null 32 | 33 | ]); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Your password has been reset!', 17 | 'sent' => 'We have emailed your password reset link!', 18 | 'throttled' => 'Please wait before retrying.', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that email address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /app/Http/Controllers/Site/CheckoutController.php: -------------------------------------------------------------------------------- 1 | orderRepository = $orderRepository; 16 | } 17 | 18 | public function getCheckout(){ 19 | \Log::info("Req=CheckoutController@getCheckout called"); 20 | return view('site.pages.checkout'); 21 | } 22 | 23 | public function placeOrder(Request $request){ 24 | \Log::info("Req=CheckoutController@placeOrder called"); 25 | $order = $this->orderRepository->storeOrderDetails($request->all()); 26 | dd($order); 27 | } 28 | } -------------------------------------------------------------------------------- /app/Models/Admin.php: -------------------------------------------------------------------------------- 1 | 'datetime' 36 | ]; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /database/migrations/2020_08_19_043703_create_settings_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('key', 150)->unique(); 19 | $table->text('value')->nullable(); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('settings'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Traits/UploadAble.php: -------------------------------------------------------------------------------- 1 | storeAs( 22 | $folder, 23 | $name.".".$file->getClientOriginalExtension(), 24 | $disk 25 | ); 26 | } 27 | 28 | /** 29 | * @param null $path 30 | * @param string $disk 31 | */ 32 | public function deleteOne($path =null, $disk = 'public'){ 33 | Storage::disk($disk)->delete($path); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 19 | SendEmailVerificationNotification::class, 20 | ], 21 | ]; 22 | 23 | /** 24 | * Register any events for your application. 25 | * 26 | * @return void 27 | */ 28 | public function boot() 29 | { 30 | parent::boot(); 31 | 32 | // 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2020_08_31_080658_create_brands_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name', 45); 19 | $table->string('slug'); 20 | $table->string('logo')->nullable(); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::dropIfExists('brands'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/scss/solid.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | @import 'variables'; 6 | 7 | @font-face { 8 | font-family: 'Font Awesome 5 Free'; 9 | font-style: normal; 10 | font-weight: 900; 11 | font-display: $fa-font-display; 12 | src: url('#{$fa-font-path}/fa-solid-900.eot'); 13 | src: url('#{$fa-font-path}/fa-solid-900.eot?#iefix') format('embedded-opentype'), 14 | url('#{$fa-font-path}/fa-solid-900.woff2') format('woff2'), 15 | url('#{$fa-font-path}/fa-solid-900.woff') format('woff'), 16 | url('#{$fa-font-path}/fa-solid-900.ttf') format('truetype'), 17 | url('#{$fa-font-path}/fa-solid-900.svg#fontawesome') format('svg'); 18 | } 19 | 20 | .fa, 21 | .fas { 22 | font-family: 'Font Awesome 5 Free'; 23 | font-weight: 900; 24 | } 25 | -------------------------------------------------------------------------------- /resources/views/site/partials/styles.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/scss/brands.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | @import 'variables'; 6 | 7 | @font-face { 8 | font-family: 'Font Awesome 5 Brands'; 9 | font-style: normal; 10 | font-weight: 400; 11 | font-display: $fa-font-display; 12 | src: url('#{$fa-font-path}/fa-brands-400.eot'); 13 | src: url('#{$fa-font-path}/fa-brands-400.eot?#iefix') format('embedded-opentype'), 14 | url('#{$fa-font-path}/fa-brands-400.woff2') format('woff2'), 15 | url('#{$fa-font-path}/fa-brands-400.woff') format('woff'), 16 | url('#{$fa-font-path}/fa-brands-400.ttf') format('truetype'), 17 | url('#{$fa-font-path}/fa-brands-400.svg#fontawesome') format('svg'); 18 | } 19 | 20 | .fab { 21 | font-family: 'Font Awesome 5 Brands'; 22 | font-weight: 400; 23 | } 24 | -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/scss/regular.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | @import 'variables'; 6 | 7 | @font-face { 8 | font-family: 'Font Awesome 5 Free'; 9 | font-style: normal; 10 | font-weight: 400; 11 | font-display: $fa-font-display; 12 | src: url('#{$fa-font-path}/fa-regular-400.eot'); 13 | src: url('#{$fa-font-path}/fa-regular-400.eot?#iefix') format('embedded-opentype'), 14 | url('#{$fa-font-path}/fa-regular-400.woff2') format('woff2'), 15 | url('#{$fa-font-path}/fa-regular-400.woff') format('woff'), 16 | url('#{$fa-font-path}/fa-regular-400.ttf') format('truetype'), 17 | url('#{$fa-font-path}/fa-regular-400.svg#fontawesome') format('svg'); 18 | } 19 | 20 | .far { 21 | font-family: 'Font Awesome 5 Free'; 22 | font-weight: 400; 23 | } 24 | -------------------------------------------------------------------------------- /config/cors.php: -------------------------------------------------------------------------------- 1 | ['api/*'], 19 | 20 | 'allowed_methods' => ['*'], 21 | 22 | 'allowed_origins' => ['*'], 23 | 24 | 'allowed_origins_patterns' => [], 25 | 26 | 'allowed_headers' => ['*'], 27 | 28 | 'exposed_headers' => [], 29 | 30 | 'max_age' => 0, 31 | 32 | 'supports_credentials' => false, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/scss/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | .#{$fa-css-prefix}-flip-both, .#{$fa-css-prefix}-flip-horizontal.#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(-1, -1, 2); } 11 | 12 | // Hook for IE8-9 13 | // ------------------------- 14 | 15 | :root { 16 | .#{$fa-css-prefix}-rotate-90, 17 | .#{$fa-css-prefix}-rotate-180, 18 | .#{$fa-css-prefix}-rotate-270, 19 | .#{$fa-css-prefix}-flip-horizontal, 20 | .#{$fa-css-prefix}-flip-vertical, 21 | .#{$fa-css-prefix}-flip-both { 22 | filter: none; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | LOG_CHANNEL=stack 8 | 9 | DB_CONNECTION=mysql 10 | DB_HOST=127.0.0.1 11 | DB_PORT=3306 12 | DB_DATABASE=laravel 13 | DB_USERNAME=root 14 | DB_PASSWORD= 15 | 16 | BROADCAST_DRIVER=log 17 | CACHE_DRIVER=file 18 | QUEUE_CONNECTION=sync 19 | SESSION_DRIVER=file 20 | SESSION_LIFETIME=120 21 | 22 | REDIS_HOST=127.0.0.1 23 | REDIS_PASSWORD=null 24 | REDIS_PORT=6379 25 | 26 | MAIL_MAILER=smtp 27 | MAIL_HOST=smtp.mailtrap.io 28 | MAIL_PORT=2525 29 | MAIL_USERNAME=null 30 | MAIL_PASSWORD=null 31 | MAIL_ENCRYPTION=null 32 | MAIL_FROM_ADDRESS=null 33 | MAIL_FROM_NAME="${APP_NAME}" 34 | 35 | AWS_ACCESS_KEY_ID= 36 | AWS_SECRET_ACCESS_KEY= 37 | AWS_DEFAULT_REGION=us-east-1 38 | AWS_BUCKET= 39 | 40 | PUSHER_APP_ID= 41 | PUSHER_APP_KEY= 42 | PUSHER_APP_SECRET= 43 | PUSHER_APP_CLUSTER=mt1 44 | 45 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 46 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 47 | -------------------------------------------------------------------------------- /database/migrations/2020_08_09_065345_create_admins_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name'); 19 | $table->string('email')->unique(); 20 | $table->timestamp('email_verified_at')->nullable(); 21 | $table->string('password'); 22 | $table->rememberToken(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('admins'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | define(User::class, function (Faker $faker) { 21 | return [ 22 | 'name' => $faker->name, 23 | 'email' => $faker->unique()->safeEmail, 24 | 'email_verified_at' => now(), 25 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 26 | 'remember_token' => Str::random(10), 27 | ]; 28 | }); 29 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 28 | } 29 | 30 | /** 31 | * Register the commands for the application. 32 | * 33 | * @return void 34 | */ 35 | protected function commands() 36 | { 37 | $this->load(__DIR__.'/Commands'); 38 | 39 | require base_path('routes/console.php'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Contracts/CategoryContract.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->unsignedBigInteger('attribute_id'); 19 | $table->foreign('attribute_id')->references('id')->on('attributes'); 20 | $table->text('value'); 21 | $table->decimal('price',10)->nullable(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('attribute_values'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2020_09_01_084710_product_categories.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->unsignedBigInteger('category_id')->index(); 19 | $table->foreign('category_id')->references('id')->on('categories'); 20 | $table->unsignedBigInteger('product_id')->index(); 21 | $table->foreign('product_id')->references('id')->on('products'); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::dropIfExists('product_categories'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /public/frontend/plugins/owlcarousel/assets/owl.theme.default.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.3.4 3 | * Copyright 2013-2018 David Deutsch 4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 5 | */ 6 | .owl-theme .owl-dots,.owl-theme .owl-nav{text-align:center;-webkit-tap-highlight-color:transparent}.owl-theme .owl-nav{margin-top:10px}.owl-theme .owl-nav [class*=owl-]{color:#FFF;font-size:14px;margin:5px;padding:4px 7px;background:#D6D6D6;display:inline-block;cursor:pointer;border-radius:3px}.owl-theme .owl-nav [class*=owl-]:hover{background:#869791;color:#FFF;text-decoration:none}.owl-theme .owl-nav .disabled{opacity:.5;cursor:default}.owl-theme .owl-nav.disabled+.owl-dots{margin-top:10px}.owl-theme .owl-dots .owl-dot{display:inline-block;zoom:1}.owl-theme .owl-dots .owl-dot span{width:10px;height:10px;margin:5px 7px;background:#D6D6D6;display:block;-webkit-backface-visibility:visible;transition:opacity .2s ease;border-radius:30px}.owl-theme .owl-dots .owl-dot.active span,.owl-theme .owl-dots .owl-dot:hover span{background:#869791} -------------------------------------------------------------------------------- /public/frontend/plugins/owlcarousel/assets/owl.theme.green.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.3.4 3 | * Copyright 2013-2018 David Deutsch 4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 5 | */ 6 | .owl-theme .owl-dots,.owl-theme .owl-nav{text-align:center;-webkit-tap-highlight-color:transparent}.owl-theme .owl-nav{margin-top:10px}.owl-theme .owl-nav [class*=owl-]{color:#FFF;font-size:14px;margin:5px;padding:4px 7px;background:#D6D6D6;display:inline-block;cursor:pointer;border-radius:3px}.owl-theme .owl-nav [class*=owl-]:hover{background:#4DC7A0;color:#FFF;text-decoration:none}.owl-theme .owl-nav .disabled{opacity:.5;cursor:default}.owl-theme .owl-nav.disabled+.owl-dots{margin-top:10px}.owl-theme .owl-dots .owl-dot{display:inline-block;zoom:1}.owl-theme .owl-dots .owl-dot span{width:10px;height:10px;margin:5px 7px;background:#D6D6D6;display:block;-webkit-backface-visibility:visible;transition:opacity .2s ease;border-radius:30px}.owl-theme .owl-dots .owl-dot.active span,.owl-theme .owl-dots .owl-dot:hover span{background:#4DC7A0} -------------------------------------------------------------------------------- /app/Models/Category.php: -------------------------------------------------------------------------------- 1 | 'integer', 22 | 'featured' => 'boolean', 23 | 'memu' => 'boolean' 24 | ]; 25 | 26 | public function setNameAttribute($value){ 27 | $this->attributes['name'] = $value; 28 | $this->attributes['slug'] = Str::slug($value); 29 | } 30 | 31 | public function parent(){ 32 | return $this->belongsTo(Category::class, 'parent_id'); 33 | } 34 | 35 | public function children(){ 36 | return $this->hasMany(Category::class, 'parent_id'); 37 | } 38 | 39 | public function products(){ 40 | return $this->belongsToMany(Product::class, 'product_categories', 'category_id', 'product_id'); 41 | } 42 | } 43 | 44 | -------------------------------------------------------------------------------- /database/migrations/2020_09_01_073044_create_product_images_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->unsignedBigInteger('product_id')->index(); 19 | $table->string('thumbnail')->nullable(); 20 | $table->string('full')->nullable(); 21 | $table->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('product_images'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2020_08_23_045907_create_attributes_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('code')->unique(); 19 | $table->string('name'); 20 | $table->enum('frontend_type', ['select', 'radio', 'text', 'text area']); 21 | $table->boolean('is_filterable')->default(0); 22 | $table->boolean('is_required')->default(0); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('attributes'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | ], 22 | 23 | 'postmark' => [ 24 | 'token' => env('POSTMARK_TOKEN'), 25 | ], 26 | 27 | 'ses' => [ 28 | 'key' => env('AWS_ACCESS_KEY_ID'), 29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 31 | ], 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /app/Models/User.php: -------------------------------------------------------------------------------- 1 | 'datetime', 38 | ]; 39 | 40 | 41 | public function getFullNameAttribute(){ 42 | return $this->first_name. ' '. $this->last_name; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /public/backend/dropzone/.tagconfig: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | { 4 | "name": "src/dropzone.coffee", 5 | "regexs": [ 6 | "Dropzone.version = \"###\"" 7 | ] 8 | }, 9 | { 10 | "name": "dist/dropzone.js", 11 | "regexs": [ 12 | "version = \"###\"" 13 | ] 14 | }, 15 | { 16 | "name": "dist/min/dropzone.min.js", 17 | "regexs": [ 18 | "version=\"###\"" 19 | ] 20 | }, 21 | { 22 | "name": "dist/dropzone-amd-module.js", 23 | "regexs": [ 24 | "version = \"###\"" 25 | ] 26 | }, 27 | { 28 | "name": "dist/min/dropzone-amd-module.min.js", 29 | "regexs": [ 30 | "version=\"###\"" 31 | ] 32 | }, 33 | { 34 | "name": "package.json", 35 | "regexs": [ 36 | "\"version\": \"###\"" 37 | ] 38 | }, 39 | { 40 | "name": "component.json", 41 | "regexs": [ 42 | "\"version\": \"###\"" 43 | ] 44 | }, 45 | { 46 | "name": "bower.json", 47 | "regexs": [ 48 | "\"version\": \"###\"" 49 | ] 50 | } 51 | ] 52 | } 53 | -------------------------------------------------------------------------------- /public/backend/dropzone/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dropzone", 3 | "version": "5.7.0", 4 | "description": "Handles drag and drop of files for you.", 5 | "keywords": [ 6 | "dragndrop", 7 | "drag and drop", 8 | "file upload", 9 | "upload" 10 | ], 11 | "homepage": "http://www.dropzonejs.com", 12 | "main": "./dist/dropzone.js", 13 | "maintainers": [ 14 | { 15 | "name": "Matias Meno", 16 | "email": "m@tias.me", 17 | "web": "http://www.colorglare.com" 18 | } 19 | ], 20 | "contributors": [ 21 | { 22 | "name": "Matias Meno", 23 | "email": "m@tias.me", 24 | "web": "http://www.colorglare.com" 25 | } 26 | ], 27 | "scripts": { 28 | "test": "grunt && npm run test-prebuilt", 29 | "test-prebuilt": "mocha-headless-chrome -f test/test-prebuilt.html -a no-sandbox -a disable-setuid-sandbox" 30 | }, 31 | "bugs": { 32 | "email": "m@tias.me", 33 | "url": "https://gitlab.com/meno/dropzone/issues" 34 | }, 35 | "license": "MIT", 36 | "repository": { 37 | "type": "git", 38 | "url": "https://gitlab.com/meno/dropzone.git" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /public/frontend/fonts/material-icons/material-icons.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Material Icons'; 3 | font-style: normal; 4 | font-weight: 400; 5 | src: url(MaterialIcons-Regular.eot); /* For IE6-8 */ 6 | src: local('Material Icons'), 7 | local('MaterialIcons-Regular'), 8 | url(MaterialIcons-Regular.woff2) format('woff2'), 9 | url(MaterialIcons-Regular.woff) format('woff'), 10 | url(MaterialIcons-Regular.ttf) format('truetype'); 11 | } 12 | 13 | .material-icons { 14 | font-family: 'Material Icons'; 15 | font-weight: normal; 16 | font-style: normal; 17 | font-size: inherit; 18 | display: inline-block; 19 | text-transform: none; 20 | letter-spacing: normal; 21 | word-wrap: normal; 22 | white-space: nowrap; 23 | direction: ltr; 24 | line-height: 1.2; 25 | 26 | /* Support for all WebKit browsers. */ 27 | -webkit-font-smoothing: antialiased; 28 | /* Support for Safari and Chrome. */ 29 | text-rendering: optimizeLegibility; 30 | 31 | /* Support for Firefox. */ 32 | -moz-osx-font-smoothing: grayscale; 33 | 34 | /* Support for IE. */ 35 | font-feature-settings: 'liga'; 36 | } -------------------------------------------------------------------------------- /app/Models/Setting.php: -------------------------------------------------------------------------------- 1 | where('key', $key)->first(); 21 | if(!$entry){ 22 | return; 23 | } 24 | return $entry->value; 25 | } 26 | 27 | /** 28 | * @param $key 29 | * @param null $value 30 | * return bool 31 | */ 32 | public static function set($key, $value = null){ 33 | \Log::info("Req=Models/Setting@set called"); 34 | $setting = new self(); 35 | $entry = $setting->where('key', $key)->firstOrFail(); 36 | $entry->value = $value; 37 | $entry->saveOrFail(); 38 | // Set Config key --> 39 | Config::set('key', $value); 40 | if(Config::get($key) == $value){ 41 | return true; 42 | } 43 | return false; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /database/migrations/2020_08_20_054720_create_categories_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name'); 19 | $table->string('slug')->unique(); 20 | $table->text('description')->nullable(); 21 | $table->unsignedInteger('parent_id')->default(1)->nullable(); 22 | $table->boolean('featured')->default(0); 23 | $table->boolean('menu')->default(1); 24 | $table->string('image')->nullable(); 25 | $table->timestamps(); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('categories'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /public/backend/dropzone/LICENSE: -------------------------------------------------------------------------------- 1 | License 2 | 3 | (The MIT License) 4 | 5 | Copyright (c) 2012 Matias Meno 6 | Logo & Website Design (c) 2015 "1910" www.weare1910.com 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /database/migrations/2020_09_17_044028_create_order_items_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->unsignedBigInteger('order_id')->index(); 19 | $table->unsignedBigInteger('product_id')->index(); 20 | $table->unsignedInteger('quantity'); 21 | $table->decimal('price', 20, 6); 22 | $table->foreign('order_id')->references('id')->on('orders')->onDelete('cascade'); 23 | $table->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('order_items'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('first_name'); 19 | $table->string('last_name'); 20 | $table->string('email')->unique(); 21 | $table->timestamp('email_verified_at')->nullable(); 22 | $table->string('password'); 23 | $table->string('address', 255)->nullable(); 24 | $table->string('city')->nullable(); 25 | $table->string('country')->nullable(); 26 | $table->rememberToken(); 27 | $table->timestamps(); 28 | }); 29 | } 30 | 31 | /** 32 | * Reverse the migrations. 33 | * 34 | * @return void 35 | */ 36 | public function down() 37 | { 38 | Schema::dropIfExists('users'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /database/migrations/2020_09_01_081000_create_product_attributes_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->integer('quantity'); 19 | $table->decimal('price')->nullable(); 20 | $table->unsignedBigInteger('product_id'); 21 | $table->unsignedBigInteger('attribute_id'); 22 | $table->string('value'); 23 | $table->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); 24 | $table->foreign('attribute_id')->references('id')->on('attributes'); 25 | $table->timestamps(); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('product_attributes'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /public/frontend/css/responsive.css: -------------------------------------------------------------------------------- 1 | @media (max-width: 1200px) { 2 | /* tablet devices */ } 3 | @media (max-width: 992px) { 4 | /* small tablet devices */ 5 | .slider-main .item-slide { 6 | height: auto; } 7 | 8 | .menu-category .submenu { 9 | max-width: 100%; 10 | left: 0; 11 | top: 100%; } 12 | 13 | .border-cols > [class*="col-"] { 14 | border-width: 0 0 1px 1px; } } 15 | @media all and (max-width: 768px) { 16 | /* mobile devices */ 17 | .navbar { 18 | padding: 1rem; } 19 | 20 | .navbar-landing { 21 | transition: .5s; 22 | padding-top: 7px; 23 | padding-bottom: 7px; } 24 | 25 | .nav-item .btn { 26 | margin: 7px 0 !important; } 27 | 28 | .list-inline-item { 29 | vertical-align: middle; 30 | margin-bottom: 5px; 31 | margin-top: 5px; } 32 | 33 | .section-header .logo, .header-main .logo { 34 | max-height: 30px; 35 | width: auto; } 36 | .section-header .logo-text, .header-main .logo-text { 37 | font-size: 24px; } 38 | .section-header .brand-wrap, .section-header .search-wrap, .section-header .widget-header, .header-main .brand-wrap, .header-main .search-wrap, .header-main .widget-header { 39 | margin-bottom: 1rem; } } 40 | 41 | /*# sourceMappingURL=responsive.css.map */ 42 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 6 | "watch": "npm run development -- --watch", 7 | "watch-poll": "npm run watch -- --watch-poll", 8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js", 9 | "prod": "npm run production", 10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" 11 | }, 12 | "devDependencies": { 13 | "axios": "^0.19", 14 | "cross-env": "^7.0", 15 | "laravel-mix": "^5.0.5", 16 | "lodash": "^4.17.19", 17 | "resolve-url-loader": "^3.1.0", 18 | "sass": "^1.15.2", 19 | "sass-loader": "^8.0.0", 20 | "vue": "^2.5.17", 21 | "vue-template-compiler": "^2.6.12" 22 | }, 23 | "dependencies": { 24 | "vue-swal": "^0.1.0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /public/backend/dropzone/dist/basic.css: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License 3 | * Copyright (c) 2012 Matias Meno 4 | */ 5 | .dropzone, .dropzone * { 6 | box-sizing: border-box; } 7 | 8 | .dropzone { 9 | position: relative; } 10 | .dropzone .dz-preview { 11 | position: relative; 12 | display: inline-block; 13 | width: 120px; 14 | margin: 0.5em; } 15 | .dropzone .dz-preview .dz-progress { 16 | display: block; 17 | height: 15px; 18 | border: 1px solid #aaa; } 19 | .dropzone .dz-preview .dz-progress .dz-upload { 20 | display: block; 21 | height: 100%; 22 | width: 0; 23 | background: green; } 24 | .dropzone .dz-preview .dz-error-message { 25 | color: red; 26 | display: none; } 27 | .dropzone .dz-preview.dz-error .dz-error-message, .dropzone .dz-preview.dz-error .dz-error-mark { 28 | display: block; } 29 | .dropzone .dz-preview.dz-success .dz-success-mark { 30 | display: block; } 31 | .dropzone .dz-preview .dz-error-mark, .dropzone .dz-preview .dz-success-mark { 32 | position: absolute; 33 | display: none; 34 | left: 30px; 35 | top: 30px; 36 | width: 54px; 37 | height: 58px; 38 | left: 50%; 39 | margin-left: -27px; } 40 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/RegisterController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 19 | } 20 | 21 | public function validator(Array $data){ 22 | return Validator::make($data, [ 23 | 'first_name' => ['required', 'string', 'max:255'], 24 | 'last_name' => ['required', 'string', 'max:255'], 25 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 26 | 'password' => ['required', 'string', 'min:8', 'confirmed'], 27 | ]); 28 | } 29 | 30 | 31 | public function create(array $data){ 32 | return User::create([ 33 | 'first_name' => $data['first_name'], 34 | 'last_name' => $data['last_name'], 35 | 'email' => $data['email'], 36 | 'password' => Hash::make($data['password']), 37 | 'address' => $data['address'], 38 | 'city' => $data['city'], 39 | 'country' => $data['country'], 40 | ]); 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /resources/views/admin/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | @yield('title') - {{ config('app.name') }} 6 | 7 | 8 | 9 | 10 | 11 | @yield('styles') 12 | 13 | 14 | 15 | @include('admin.partials.header') 16 | @include('admin.partials.sidebar') 17 | 18 |
19 | @yield('content') 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | @stack('scripts') 30 | 31 | 32 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 22 | // return redirect(RouteServiceProvider::HOME); 23 | // } 24 | \Log::info('Req=RedirectIfAuthenticated@handle called'); 25 | 26 | switch ($guard) { 27 | case 'admin': 28 | if(Auth::guard($guard)->check()){ 29 | return redirect()->route('admin.dashboard'); 30 | } 31 | break; 32 | 33 | default: 34 | if(Auth::guard($guard)->check()){ 35 | return redirect()->route('/'); 36 | } 37 | 38 | break; 39 | } 40 | 41 | return $next($request); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/Models/Product.php: -------------------------------------------------------------------------------- 1 | 'integer', 18 | 'brand_id' => 'integer', 19 | 'status' => 'boolean', 20 | 'featured' => 'boolean', 21 | ]; 22 | 23 | 24 | public function setNameAttribute($value){ 25 | $this->attributes['name'] = $value; 26 | $this->attributes['slug'] = Str::slug($value); 27 | } 28 | 29 | public function brand(){ 30 | // $products->brand 31 | return $this->belongsTo(Brand::class); 32 | } 33 | 34 | public function images(){ 35 | // $product->images 36 | return $this->hasMany(ProductImage::class); 37 | } 38 | 39 | public function attributes(){ 40 | // $product->attributes 41 | return $this->hasMany(ProductAttribute::class); 42 | } 43 | 44 | public function categories(){ 45 | // $product->categories()->sync(array(1,2,3)); 46 | return $this->belongsToMany(Category::class, 'product_categories', 'product_id','category_id'); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | ./tests/Unit 10 | 11 | 12 | ./tests/Feature 13 | 14 | 15 | 16 | 17 | ./app 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /resources/views/site/partials/nav.blade.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/views/admin/partials/flash.blade.php: -------------------------------------------------------------------------------- 1 | @php 2 | $errors = Session::get('error'); 3 | $messages = Session::get('success'); 4 | $info = Session::get('info'); 5 | $warnings = Session::get('warning'); 6 | @endphp 7 | @if ($errors) @foreach($errors as $key => $value) 8 | 12 | @endforeach @endif 13 | 14 | @if ($messages) @foreach($messages as $key => $value) 15 | 19 | @endforeach @endif 20 | 21 | @if ($info) @foreach($info as $key => $value) 22 | 26 | @endforeach @endif 27 | 28 | @if ($warnings) @foreach($warnings as $key => $value) 29 | 33 | @endforeach @endif -------------------------------------------------------------------------------- /app/Http/Requests/ProductFormValidate.php: -------------------------------------------------------------------------------- 1 | 'required|max:255', 29 | 'sku' => 'required', 30 | 'brand_id' => 'required|not_in:0', 31 | 'price' => 'required|regex:/^\d+(\.\d{1,2})?$/', 32 | 'special_price' => 'regex:/^\d+(\.\d{1,2})?$/', 33 | 'quantity' => 'required|numeric' 34 | ]; 35 | } 36 | 37 | /** 38 | * Get Custom Validator message 39 | * @return array 40 | */ 41 | public function attributes(){ 42 | \Log::info("Req=ProductForValidate@attributes called"); 43 | return [ 44 | 45 | ]; 46 | } 47 | 48 | /** 49 | * Validator after action 50 | * @return void 51 | */ 52 | public function withValidator($validator){ 53 | \Log::info("Req=ProductFormValidate@withValidator called"); 54 | 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /app/Providers/SettingServiceProvider.php: -------------------------------------------------------------------------------- 1 | app->bind('settings', function($app){ 24 | return new Setting(); 25 | }); 26 | $loader = \Illuminate\Foundation\AliasLoader::getInstance(); 27 | $loader->alias('Setting', Setting::class); 28 | } 29 | 30 | /** 31 | * Bootstrap services. 32 | * 33 | * @return void 34 | */ 35 | public function boot() 36 | { 37 | \Log::info("Req=Providers/SettingServiceProvider@boot called"); 38 | // only use the Settings package if the Settings table is present in the database 39 | if(!\App::runningInConsole() && count(Schema::getColumnListing('settings'))){ 40 | $settings = Setting::all(); 41 | foreach($settings as $key => $setting){ 42 | Config::set('settings.'.$setting->key, $setting->value); 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | name('category.show'); 21 | Route::get('/product/{slug}', 'Site\ProductController@show')->name('product.show'); 22 | Route::post('/product/add/cart', 'Site\ProductController@addToCart')->name('product.add.cart'); 23 | Route::get('/cart', 'Site\CartController@getCart')->name('checkout.cart'); 24 | 25 | Route::get('/cart/item/{id}/remove', 'Site\CartController@removeItem')->name('checkout.cart.remove'); 26 | Route::get('/cart/clear', 'Site\CartController@clearCart')->name('checkout.cart.clear'); 27 | 28 | Route::group(['middleware' => ['auth']], function(){ 29 | Route::get('/checkout', 'Site\CheckoutController@getCheckout')->name('checkout.index'); 30 | Route::post('/checkout/order', 'Site\CheckoutController@placeOrder')->name('checkout.place.order'); 31 | }); 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/Contracts/BaseContract.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->unsignedBigInteger('brand_id')->index(); 19 | $table->string('sku'); 20 | $table->string('name'); 21 | $table->string('slug'); 22 | $table->text('description')->nullable(); 23 | $table->unsignedBigInteger('quantity'); 24 | $table->decimal('weight',8,2)->nullable(); 25 | $table->decimal('price',8,2)->nullable(); 26 | $table->decimal('special_price', 8,2)->nullable(); 27 | $table->boolean('status')->default(1); 28 | $table->boolean('featured')->default(0); 29 | 30 | $table->foreign('brand_id')->references('id')->on('brands')->onDelete('cascade'); 31 | $table->timestamps(); 32 | }); 33 | } 34 | 35 | /** 36 | * Reverse the migrations. 37 | * 38 | * @return void 39 | */ 40 | public function down() 41 | { 42 | Schema::dropIfExists('products'); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/Http/Controllers/Site/ProductController.php: -------------------------------------------------------------------------------- 1 | productRepository = $productRepository; 19 | $this->attributeRepository = $attributeRepository; 20 | } 21 | 22 | public function show($slug){ 23 | \Log::info("Req=ProductController@show called"); 24 | $product = $this->productRepository->findProductBySlug($slug); 25 | $attributes = $this->attributeRepository->listAttributes(); 26 | return view('site.pages.product', compact('product', 'attributes')); 27 | } 28 | 29 | public function addToCart(Request $request){ 30 | \Log::info("Req=ProductController@addToCart called"); 31 | $product = $this->productRepository->findProductById($request->input('productId')); 32 | $options = $request->except('_token', 'productId', 'price', 'qty'); 33 | 34 | Cart::add(uniqid(), $product->name, $request->input('price'), $request->input('qty'), $options); 35 | return redirect()->back()->with('message', 'Item added to cart successfully'); 36 | 37 | } 38 | 39 | } -------------------------------------------------------------------------------- /public/frontend/fonts/fontawesome/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | @mixin fa-icon { 5 | -webkit-font-smoothing: antialiased; 6 | -moz-osx-font-smoothing: grayscale; 7 | display: inline-block; 8 | font-style: normal; 9 | font-variant: normal; 10 | font-weight: normal; 11 | line-height: 1; 12 | } 13 | 14 | @mixin fa-icon-rotate($degrees, $rotation) { 15 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation})"; 16 | transform: rotate($degrees); 17 | } 18 | 19 | @mixin fa-icon-flip($horiz, $vert, $rotation) { 20 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}, mirror=1)"; 21 | transform: scale($horiz, $vert); 22 | } 23 | 24 | 25 | // Only display content to screen readers. A la Bootstrap 4. 26 | // 27 | // See: http://a11yproject.com/posts/how-to-hide-content/ 28 | 29 | @mixin sr-only { 30 | border: 0; 31 | clip: rect(0, 0, 0, 0); 32 | height: 1px; 33 | margin: -1px; 34 | overflow: hidden; 35 | padding: 0; 36 | position: absolute; 37 | width: 1px; 38 | } 39 | 40 | // Use in conjunction with .sr-only to only display content when it's focused. 41 | // 42 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 43 | // 44 | // Credit: HTML5 Boilerplate 45 | 46 | @mixin sr-only-focusable { 47 | &:active, 48 | &:focus { 49 | clip: auto; 50 | height: auto; 51 | margin: 0; 52 | overflow: visible; 53 | position: static; 54 | width: auto; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /public/frontend/plugins/owlcarousel/assets/owl.theme.green.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.3.4 3 | * Copyright 2013-2018 David Deutsch 4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 5 | */ 6 | /* 7 | * Green theme - Owl Carousel CSS File 8 | */ 9 | .owl-theme .owl-nav { 10 | margin-top: 10px; 11 | text-align: center; 12 | -webkit-tap-highlight-color: transparent; } 13 | .owl-theme .owl-nav [class*='owl-'] { 14 | color: #FFF; 15 | font-size: 14px; 16 | margin: 5px; 17 | padding: 4px 7px; 18 | background: #D6D6D6; 19 | display: inline-block; 20 | cursor: pointer; 21 | border-radius: 3px; } 22 | .owl-theme .owl-nav [class*='owl-']:hover { 23 | background: #4DC7A0; 24 | color: #FFF; 25 | text-decoration: none; } 26 | .owl-theme .owl-nav .disabled { 27 | opacity: 0.5; 28 | cursor: default; } 29 | 30 | .owl-theme .owl-nav.disabled + .owl-dots { 31 | margin-top: 10px; } 32 | 33 | .owl-theme .owl-dots { 34 | text-align: center; 35 | -webkit-tap-highlight-color: transparent; } 36 | .owl-theme .owl-dots .owl-dot { 37 | display: inline-block; 38 | zoom: 1; 39 | *display: inline; } 40 | .owl-theme .owl-dots .owl-dot span { 41 | width: 10px; 42 | height: 10px; 43 | margin: 5px 7px; 44 | background: #D6D6D6; 45 | display: block; 46 | -webkit-backface-visibility: visible; 47 | transition: opacity 200ms ease; 48 | border-radius: 30px; } 49 | .owl-theme .owl-dots .owl-dot.active span, .owl-theme .owl-dots .owl-dot:hover span { 50 | background: #4DC7A0; } 51 | -------------------------------------------------------------------------------- /public/frontend/plugins/owlcarousel/assets/owl.theme.default.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.3.4 3 | * Copyright 2013-2018 David Deutsch 4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 5 | */ 6 | /* 7 | * Default theme - Owl Carousel CSS File 8 | */ 9 | .owl-theme .owl-nav { 10 | margin-top: 10px; 11 | text-align: center; 12 | -webkit-tap-highlight-color: transparent; } 13 | .owl-theme .owl-nav [class*='owl-'] { 14 | color: #FFF; 15 | font-size: 14px; 16 | margin: 5px; 17 | padding: 4px 7px; 18 | background: #D6D6D6; 19 | display: inline-block; 20 | cursor: pointer; 21 | border-radius: 3px; } 22 | .owl-theme .owl-nav [class*='owl-']:hover { 23 | background: #869791; 24 | color: #FFF; 25 | text-decoration: none; } 26 | .owl-theme .owl-nav .disabled { 27 | opacity: 0.5; 28 | cursor: default; } 29 | 30 | .owl-theme .owl-nav.disabled + .owl-dots { 31 | margin-top: 10px; } 32 | 33 | .owl-theme .owl-dots { 34 | text-align: center; 35 | -webkit-tap-highlight-color: transparent; } 36 | .owl-theme .owl-dots .owl-dot { 37 | display: inline-block; 38 | zoom: 1; 39 | *display: inline; } 40 | .owl-theme .owl-dots .owl-dot span { 41 | width: 10px; 42 | height: 10px; 43 | margin: 5px 7px; 44 | background: #D6D6D6; 45 | display: block; 46 | -webkit-backface-visibility: visible; 47 | transition: opacity 200ms ease; 48 | border-radius: 30px; } 49 | .owl-theme .owl-dots .owl-dot.active span, .owl-theme .owl-dots .owl-dot:hover span { 50 | background: #869791; } 51 | -------------------------------------------------------------------------------- /database/migrations/2020_09_17_042632_create_orders_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('order_number')->unique(); 19 | $table->unsignedBigInteger('user_id'); 20 | $table->enum('status', ['pending', 'processing', 'completed', 'decline'])->default('pending'); 21 | $table->decimal('grand_total', 20, 6); 22 | $table->unsignedBigInteger('item_count'); 23 | $table->boolean('payment_status')->default(1); 24 | $table->string('payment_method')->nullable(); 25 | $table->string('first_name'); 26 | $table->string('last_name'); 27 | $table->string('address'); 28 | $table->string('city'); 29 | $table->string('country'); 30 | $table->string('post_code'); 31 | $table->string('phone_number'); 32 | $table->text('notes'); 33 | 34 | $table->foreign('user_id')->references('id')->on('users'); 35 | $table->timestamps(); 36 | }); 37 | } 38 | 39 | /** 40 | * Reverse the migrations. 41 | * 42 | * @return void 43 | */ 44 | public function down() 45 | { 46 | Schema::dropIfExists('orders'); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/Providers/RepositoryServiceProvider.php: -------------------------------------------------------------------------------- 1 | CategoryRepository::class, 28 | AttributeContract::class => AttributeRepository::class, 29 | BrandContract::class => BrandRepository::class, 30 | ProductContract::class => ProductRepository::class, 31 | OrderContract::class => OrderRepository::class, 32 | ]; 33 | 34 | /** 35 | * Register services. 36 | * 37 | * @return void 38 | */ 39 | public function register() 40 | { 41 | \Log::info("Req=Providers/RepositoryServiceProvider@register Called"); 42 | 43 | foreach ($this->repositories as $interface => $implementation) { 44 | $this->app->bind($interface, $implementation); 45 | } 46 | } 47 | 48 | /** 49 | * Bootstrap services. 50 | * 51 | * @return void 52 | */ 53 | public function boot() 54 | { 55 | // 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /resources/views/admin/settings/includes/analytics.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | @csrf 4 |

Analytics

5 |
6 |
7 |
8 | 9 | 16 |
17 |
18 | 19 | 26 |
27 |
28 | 35 |
36 |
-------------------------------------------------------------------------------- /app/Traits/FlashMessages.php: -------------------------------------------------------------------------------- 1 | $value){ 44 | array_push($this->$model, $value); 45 | } 46 | }else{ 47 | array_push($this->$model, $message); 48 | } 49 | } 50 | 51 | 52 | /* 53 | * @return array 54 | */ 55 | protected function getFlashMessages(){ 56 | return [ 57 | 'success' => $this->successMessages, 58 | 'warning' => $this->warningMessages, 59 | 'error' => $this->errorMessages, 60 | 'info' => $this->infoMessages, 61 | ]; 62 | } 63 | 64 | 65 | /* 66 | * Flushing flash message to Laravel's session 67 | */ 68 | protected function showFlashMessages(){ 69 | session()->flash('success', $this->successMessages); 70 | session()->flash('warning', $this->warningMessages); 71 | session()->flash('error', $this->errorMessages); 72 | session()->flash('info', $this->infoMessages); 73 | } 74 | } -------------------------------------------------------------------------------- /app/Repositories/OrderRepository.php: -------------------------------------------------------------------------------- 1 | model = $model; 16 | } 17 | 18 | public function storeOrderDetails($params){ 19 | \Log::info("Req=Repositories/OrderRepository@storeOrderDetails Called"); 20 | $order = Order::create([ 21 | 'order_number' => 'ORD-'.strtoupper(uniqid()), 22 | 'user_id' => Auth()->user()->id, 23 | 'status' => 'pending', 24 | 'grand_total' => Cart::getSubTotal(), 25 | 'item_count' => Cart::getTotalQuantity(), 26 | 'payment_status' => 0, 27 | 'payment_method' => null, 28 | 'first_name' => $params['first_name'], 29 | 'last_name' => $params['last_name'], 30 | 'address' => $params['address'], 31 | 'city' => $params['city'], 32 | 'country' => $params['country'], 33 | 'post_code' => $params['post_code'], 34 | 'phone_number' => $params['phone_number'], 35 | 'notes' => $params['notes'] 36 | ]); 37 | 38 | if($order){ 39 | 40 | $items = Cart::getContent(); 41 | 42 | foreach($items as $item){ 43 | $product = Product::where('name', $item->name)->first(); 44 | 45 | $orderItem = new orderItem([ 46 | 'product_id' => $product->id, 47 | 'quantity' => $item->quantity, 48 | 'price' => $item->getPriceSum() 49 | 50 | ]); 51 | 52 | 53 | $order->items()->save($orderItem); 54 | } 55 | } 56 | 57 | return $order; 58 | } 59 | } -------------------------------------------------------------------------------- /config/hashing.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Bcrypt Options 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may specify the configuration options that should be used when 26 | | passwords are hashed using the Bcrypt algorithm. This will allow you 27 | | to control the amount of time it takes to hash the given password. 28 | | 29 | */ 30 | 31 | 'bcrypt' => [ 32 | 'rounds' => env('BCRYPT_ROUNDS', 10), 33 | ], 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Argon Options 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Here you may specify the configuration options that should be used when 41 | | passwords are hashed using the Argon algorithm. These will allow you 42 | | to control the amount of time it takes to hash the given password. 43 | | 44 | */ 45 | 46 | 'argon' => [ 47 | 'memory' => 1024, 48 | 'threads' => 2, 49 | 'time' => 2, 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /public/backend/dropzone/README.md: -------------------------------------------------------------------------------- 1 | Dropzone.js 2 | 3 | Dropzone.js is a light weight JavaScript library that turns an HTML element into a dropzone. 4 | This means that a user can drag and drop a file onto it, and the file gets uploaded to the server via AJAX. 5 | 6 | * * * 7 | 8 | _If you want support, please use [stackoverflow](http://stackoverflow.com/) with the `dropzone.js` tag and not the 9 | GitHub issues tracker. Only post an issue here if you think you discovered a bug or have a feature request._ 10 | 11 | * * * 12 | 13 | **Please read the [contributing guidelines](CONTRIBUTING.md) before you start working on Dropzone!** 14 | 15 |
16 |
17 | >> Download << 18 |
19 |
20 |
21 | 22 | This is no longer the official repository for Dropzone. I have switched to [gitlab.com](https://gitlab.com/meno/dropzone) 23 | as the primary location to continue development. 24 | 25 | There are multiple reasons why I am switching from GitHub to GitLab, but a few of the reasons are the 26 | issue tracker that GitHub is providing, *drowning* me in issues that I am unable to categorise or prioritize properly, 27 | the lack of proper continuous integration, and build files. I don't want the compiled `.js` files in my repository, and 28 | people regularly commit changes to the compiled files and create pull requests with them. 29 | 30 | I will write a blog post soon, that goes into detail about why I am doing the switch. 31 | 32 | This repository will still remain, and always host the most up to date versions of dropzone, but only the distribution 33 | files! 34 | 35 | MIT License 36 | ----------- 37 | -------------------------------------------------------------------------------- /resources/views/admin/brands/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('admin.app') 2 | @section('title') {{ $pageTitle }} @endsection 3 | 4 | @section('content') 5 |
6 |
7 |

{{ $pageTitle }}

8 |
9 |
10 | @include('admin.partials.flash') 11 |
12 |
13 |
14 |

{{ $subTitle }}

15 |
16 | @csrf 17 |
18 |
19 | 20 | 21 | 22 | @error('name') 23 |
24 | {{ $message }} 25 |
26 | @enderror 27 |
28 | 29 |
30 | 31 | 32 | 33 | @error('logo') 34 |
35 | {{ $message }} 36 |
37 | @enderror 38 |
39 |
40 | 45 |
46 |
47 |
48 |
49 | 50 | @endsection -------------------------------------------------------------------------------- /public/frontend/js/script.js: -------------------------------------------------------------------------------- 1 | // some scripts 2 | 3 | // jquery ready start 4 | $(document).ready(function() { 5 | // jQuery code 6 | 7 | 8 | /* /////////////////////////////////////// 9 | 10 | THESE FOLLOWING SCRIPTS ONLY FOR BASIC USAGE, 11 | For sliders, interactions and other 12 | 13 | */ /////////////////////////////////////// 14 | 15 | 16 | //////////////////////// Prevent closing from click inside dropdown 17 | $(document).on('click', '.dropdown-menu', function (e) { 18 | e.stopPropagation(); 19 | }); 20 | 21 | 22 | $('.js-check :radio').change(function () { 23 | var check_attr_name = $(this).attr('name'); 24 | if ($(this).is(':checked')) { 25 | $('input[name='+ check_attr_name +']').closest('.js-check').removeClass('active'); 26 | $(this).closest('.js-check').addClass('active'); 27 | // item.find('.radio').find('span').text('Add'); 28 | 29 | } else { 30 | item.removeClass('active'); 31 | // item.find('.radio').find('span').text('Unselect'); 32 | } 33 | }); 34 | 35 | 36 | $('.js-check :checkbox').change(function () { 37 | var check_attr_name = $(this).attr('name'); 38 | if ($(this).is(':checked')) { 39 | $(this).closest('.js-check').addClass('active'); 40 | // item.find('.radio').find('span').text('Add'); 41 | } else { 42 | $(this).closest('.js-check').removeClass('active'); 43 | // item.find('.radio').find('span').text('Unselect'); 44 | } 45 | }); 46 | 47 | 48 | 49 | //////////////////////// Bootstrap tooltip 50 | if($('[data-toggle="tooltip"]').length>0) { // check if element exists 51 | $('[data-toggle="tooltip"]').tooltip() 52 | } // end if 53 | 54 | 55 | 56 | 57 | 58 | }); 59 | // jquery end 60 | 61 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/LoginController.php: -------------------------------------------------------------------------------- 1 | middleware('guest:admin')->except('logout'); 30 | } 31 | 32 | /** 33 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View 34 | */ 35 | public function showLoginForm(){ 36 | 37 | \Log::info("Request= Admin/LoginController@showLoginForm called"); 38 | 39 | return view('admin.auth.login'); 40 | } 41 | 42 | public function login(Request $request){ 43 | 44 | \Log::info("Request= Admin/LoginController@login called"); 45 | 46 | $request->validate([ 47 | 'email' => 'required|email|max:30', 48 | 'password' => 'required|max:20|min:5' 49 | ]); 50 | 51 | if(Auth::guard('admin')->attempt([ 52 | 'email' => $request->email, 53 | 'password' => $request->password 54 | ], $request->get('remember'))){ 55 | 56 | return redirect()->intended(route('admin.dashboard')); 57 | } 58 | 59 | return back()->withInput($request->only('email', 'password')); 60 | 61 | } 62 | 63 | public function logout(Request $request){ 64 | \Log::info("Request= Admin/LoginController@logout called"); 65 | 66 | Auth::guard('admin')->logout(); 67 | $request->session()->invalidate(); 68 | 69 | return redirect()->route('admin.login'); 70 | 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | 'cluster' => env('PUSHER_APP_CLUSTER'), 40 | 'useTLS' => true, 41 | ], 42 | ], 43 | 44 | 'redis' => [ 45 | 'driver' => 'redis', 46 | 'connection' => 'default', 47 | ], 48 | 49 | 'log' => [ 50 | 'driver' => 'log', 51 | ], 52 | 53 | 'null' => [ 54 | 'driver' => 'null', 55 | ], 56 | 57 | ], 58 | 59 | ]; 60 | -------------------------------------------------------------------------------- /resources/views/admin/brands/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('admin.app') 2 | @section('title') {{ $pageTitle }} @endsection 3 | @section('content') 4 |
5 |

{{ $pageTitle }}

6 | Add Brand 7 |
8 | 9 | @include('admin.partials.flash') 10 |
11 |
12 |
13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | @foreach($brands as $brand) 25 | 26 | 27 | 28 | 29 | 35 | 36 | @endforeach 37 | 38 |
# Name Slug
{{ $brand->id }} {{ $brand->name }} {{ $brand->slug }} 30 |
31 | 32 | 33 |
34 |
39 |
40 |
41 |
42 | 43 |
44 | @endsection 45 | @push('scripts') 46 | 47 | 48 | 49 | 50 | @endpush -------------------------------------------------------------------------------- /resources/views/site/pages/category.blade.php: -------------------------------------------------------------------------------- 1 | @extends('site.app') 2 | @section('title', $category->name) 3 | @section('content') 4 |
5 |
6 |

{{ $category->name }}

7 |
8 |
9 |
10 |
11 |
12 |
13 | @forelse($category->products as $product) 14 |
15 |
16 | @if ($product->images->count() > 0) 17 |
18 | @else 19 |
20 | @endif 21 |
22 |

{{ $product->name }}

23 |
24 |
25 | Buy Now 26 | @if ($product->sale_price != 0) 27 |
28 | {{ config('settings.currency_symbol').$product->sale_price }} 29 | {{ config('settings.currency_symbol').$product->price }} 30 |
31 | @else 32 |
33 | {{ config('settings.currency_symbol').$product->price }} 34 |
35 | @endif 36 |
37 |
38 |
39 | @empty 40 |

No Products found in {{ $category->name }}.

41 | @endforelse 42 |
43 |
44 |
45 |
46 | @stop -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/SettingController.php: -------------------------------------------------------------------------------- 1 | setPageTitle('Settings', 'Manage Settings'); 21 | return view('admin.settings.index'); 22 | } 23 | 24 | 25 | /** 26 | * @param Request $request 27 | * @return \Illuminate\Http\RedirectResponse 28 | */ 29 | public function update(Request $request){ 30 | \Log::info("Req=Admin/Setting@update called"); 31 | if($request->has('site_logo') && $request->file('site_logo') instanceof UploadedFile){ 32 | // logo exists --> 33 | if(config('settings.site_logo') != null ) { 34 | $this->deleteOne(config('settings.site_logo')); 35 | } 36 | // New logo upload --> 37 | $logo = $this->uploadOne($request->file('site_logo'), 'img'); 38 | Setting::set('site_logo', $logo); 39 | 40 | }elseif($request->has('site_favicon') && ($request->file('site_favicon') instanceof UploadedFile)){ 41 | if(config('settings.site_favicon') != null){ 42 | $this->deleteOne(config('settings.site_favicon')); 43 | } 44 | $favocon = $this->uploadOne($request->file('site_favicon'), 'img'); 45 | Setting::set('site_favicon', $favocon); 46 | }else{ 47 | $keys = $request->except('_token'); 48 | 49 | foreach($keys as $key => $value){ 50 | Setting::set($key, $value); 51 | } 52 | } 53 | return $this->responseRedirectBack('Settings updated successfully.', 'success'); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "type": "project", 4 | "description": "The Laravel Framework.", 5 | "keywords": [ 6 | "framework", 7 | "laravel" 8 | ], 9 | "license": "MIT", 10 | "require": { 11 | "php": "^7.2.5", 12 | "darryldecode/cart": "~4.0", 13 | "fideloper/proxy": "^4.2", 14 | "fruitcake/laravel-cors": "^2.0", 15 | "guzzlehttp/guzzle": "^6.3", 16 | "laravel/framework": "^7.24", 17 | "laravel/tinker": "^2.0", 18 | "fzaninotto/faker": "^1.9.1", 19 | "laravel/ui": "^2.1", 20 | "typicms/nestablecollection": "^1.1" 21 | }, 22 | "require-dev": { 23 | "facade/ignition": "^2.0", 24 | "mockery/mockery": "^1.3.1", 25 | "nunomaduro/collision": "^4.1", 26 | "phpunit/phpunit": "^8.5" 27 | }, 28 | "config": { 29 | "optimize-autoloader": true, 30 | "preferred-install": "dist", 31 | "sort-packages": true 32 | }, 33 | "extra": { 34 | "laravel": { 35 | "dont-discover": [] 36 | } 37 | }, 38 | "autoload": { 39 | "psr-4": { 40 | "App\\": "app/" 41 | }, 42 | "classmap": [ 43 | "database/seeds", 44 | "database/factories" 45 | ] 46 | }, 47 | "autoload-dev": { 48 | "psr-4": { 49 | "Tests\\": "tests/" 50 | } 51 | }, 52 | "minimum-stability": "dev", 53 | "prefer-stable": true, 54 | "scripts": { 55 | "post-autoload-dump": [ 56 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 57 | "@php artisan package:discover --ansi" 58 | ], 59 | "post-root-package-install": [ 60 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 61 | ], 62 | "post-create-project-cmd": [ 63 | "@php artisan key:generate --ansi" 64 | ] 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /database/seeds/CategoriesTableSeeder.php: -------------------------------------------------------------------------------- 1 | ["Cheesy Bites Pizza", 'Pizza Barcelona', 'Pizza Salami', 'Roll Pizza', 'Mushroom chicken pizza'], 13 | 'Burger' => ['Chicken Burger', 'Maxican Burger', 'Maxican club Burger', 'Maxican Little Burger'], 14 | 'Chicken' => ['Chicken Sausage', 'Chicken Nuggets', 'Spicy Chicken', 'Crispy Chicken', 'Chicken Breast'], 15 | 'Cake' => ['Cherry Cake', 'Red Velvet Cake','White Forest Cake', 'Vanilla Cake', 'Black Forest Cake'], 16 | 'Drink' => ['Chocolate Milk', 'Gold Coffee', 'Green mango Cooler', 'Lemon Shake', 'Stawbarry Shake'] 17 | 18 | ]; 19 | /** 20 | * Run the database seeds. 21 | * 22 | * @return void 23 | */ 24 | public function run(Faker $faker) 25 | { 26 | 27 | 28 | Category::create([ 29 | 'name' => 'Root', 30 | 'description' => 'This is the root category, don\'t delete this one', 31 | 'parent_id' => null, 32 | 'menu' => 0, 33 | ]); 34 | 35 | foreach($this->data as $cat => $subCats){ 36 | $id = Category::create([ 37 | 'name' => $cat, 38 | 'parent_id' => 1 39 | ])->id; 40 | 41 | $this->command->info(date('Y-m-d H:i:s'). ": Category Name = ".$cat." created"); 42 | 43 | foreach ($subCats as $subCat) { 44 | 45 | Category::create([ 46 | 'name' => $subCat, 47 | 'parent_id' => $id, 48 | 'description' => $faker->realText(100), 49 | 'menu' => 1, 50 | ]); 51 | 52 | $this->command->info(date('Y-m-d H:i:s'). ": Sub Category = ".$subCat." created"); 53 | 54 | } 55 | 56 | } 57 | 58 | // factory('App\Models\Category')->create(); 59 | 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapApiRoutes(); 46 | 47 | $this->mapWebRoutes(); 48 | 49 | // 50 | } 51 | 52 | /** 53 | * Define the "web" routes for the application. 54 | * 55 | * These routes all receive session state, CSRF protection, etc. 56 | * 57 | * @return void 58 | */ 59 | protected function mapWebRoutes() 60 | { 61 | Route::middleware('web') 62 | ->namespace($this->namespace) 63 | ->group(base_path('routes/web.php')); 64 | } 65 | 66 | /** 67 | * Define the "api" routes for the application. 68 | * 69 | * These routes are typically stateless. 70 | * 71 | * @return void 72 | */ 73 | protected function mapApiRoutes() 74 | { 75 | Route::prefix('api') 76 | ->middleware('api') 77 | ->namespace($this->namespace) 78 | ->group(base_path('routes/api.php')); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | define('LARAVEL_START', microtime(true)); 11 | 12 | /* 13 | |-------------------------------------------------------------------------- 14 | | Register The Auto Loader 15 | |-------------------------------------------------------------------------- 16 | | 17 | | Composer provides a convenient, automatically generated class loader for 18 | | our application. We just need to utilize it! We'll simply require it 19 | | into the script here so that we don't have to worry about manual 20 | | loading any of our classes later on. It feels great to relax. 21 | | 22 | */ 23 | 24 | require __DIR__.'/../vendor/autoload.php'; 25 | 26 | /* 27 | |-------------------------------------------------------------------------- 28 | | Turn On The Lights 29 | |-------------------------------------------------------------------------- 30 | | 31 | | We need to illuminate PHP development, so let us turn on the lights. 32 | | This bootstraps the framework and gets it ready for use, then it 33 | | will load up this application so that we can run it and send 34 | | the responses back to the browser and delight our users. 35 | | 36 | */ 37 | 38 | $app = require_once __DIR__.'/../bootstrap/app.php'; 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Run The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once we have the application, we can handle the incoming request 46 | | through the kernel, and send the associated response back to 47 | | the client's browser allowing them to enjoy the creative 48 | | and wonderful application we have prepared for them. 49 | | 50 | */ 51 | 52 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 53 | 54 | $response = $kernel->handle( 55 | $request = Illuminate\Http\Request::capture() 56 | ); 57 | 58 | $response->send(); 59 | 60 | $kernel->terminate($request, $response); 61 | -------------------------------------------------------------------------------- /public/backend/js/plugins/dataTables.bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | DataTables Bootstrap 3 integration 3 | ©2011-2015 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(a,d).$;return b(d,a,a.document)}:b(jQuery,window,document)})(function(b,a,d,m){var f=b.fn.dataTable;b.extend(!0,f.defaults,{dom:"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", 6 | renderer:"bootstrap"});b.extend(f.ext.classes,{sWrapper:"dataTables_wrapper container-fluid dt-bootstrap4",sFilterInput:"form-control form-control-sm",sLengthSelect:"form-control form-control-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"});f.ext.renderer.pageButton.bootstrap=function(a,h,r,s,j,n){var o=new f.Api(a),t=a.oClasses,k=a.oLanguage.oPaginate,u=a.oLanguage.oAria.paginate||{},e,g,p=0,q=function(d,f){var l,h,i,c,m=function(a){a.preventDefault();!b(a.currentTarget).hasClass("disabled")&& 7 | o.page()!=a.data.action&&o.page(a.data.action).draw("page")};l=0;for(h=f.length;l",{"class":t.sPageButton+" "+g,id:0===r&& 8 | "string"===typeof c?a.sTableId+"_"+c:null}).append(b("",{href:"#","aria-controls":a.sTableId,"aria-label":u[c],"data-dt-idx":p,tabindex:a.iTabIndex,"class":"page-link"}).html(e)).appendTo(d),a.oApi._fnBindAction(i,{action:c},m),p++)}},i;try{i=b(h).find(d.activeElement).data("dt-idx")}catch(v){}q(b(h).empty().html('
    ').children("ul"),s);i!==m&&b(h).find("[data-dt-idx="+i+"]").focus()};return f}); 9 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/AttributeValueController.php: -------------------------------------------------------------------------------- 1 | attributeRepository = $attributeRepository; 19 | } 20 | 21 | public function getValues(Request $request) 22 | { 23 | \Log::info("Req=AttributeValueController@getValues called"); 24 | 25 | $attributeId = $request->input('id'); 26 | $attribute = $this->attributeRepository->findAttributeById($attributeId); 27 | 28 | $values = $attribute->values; 29 | 30 | return response()->json($values); 31 | } 32 | 33 | public function addValues(Request $request) 34 | { 35 | \Log::info("Req=AttributeValueController@addValues called"); 36 | $value = new AttributeValue(); 37 | $value->attribute_id = $request->input('id'); 38 | $value->value = $request->input('value'); 39 | $value->price = $request->input('price'); 40 | $value->save(); 41 | 42 | return response()->json($value); 43 | } 44 | 45 | public function updateValues(Request $request) 46 | { 47 | \Log::info("Req=AttributeValueController@updateValues called"); 48 | $attributeValue = AttributeValue::findOrFail($request->input('valueId')); 49 | $attributeValue->attribute_id = $request->input('id'); 50 | $attributeValue->value = $request->input('value'); 51 | $attributeValue->price = $request->input('price'); 52 | $attributeValue->save(); 53 | 54 | return response()->json($attributeValue); 55 | } 56 | 57 | public function deleteValues(Request $request) 58 | { 59 | $attributeValue = AttributeValue::findOrFail($request->input('id')); 60 | $attributeValue->delete(); 61 | 62 | return response()->json(['status' => 'success', 'message' => 'Attribute value deleted successfully.']); 63 | } 64 | } -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/ProductAttributeController.php: -------------------------------------------------------------------------------- 1 | json($attributes); 21 | } 22 | 23 | /** 24 | * @param Request $request 25 | * @return \Illuminate\Http\JsonResponse 26 | */ 27 | public function productAttributes(Request $request) 28 | { 29 | $product = Product::findOrFail($request->id); 30 | 31 | return response()->json($product->attributes); 32 | } 33 | 34 | /** 35 | * @param Request $request 36 | * @return \Illuminate\Http\JsonResponse 37 | */ 38 | public function loadValues(Request $request) 39 | { 40 | $attribute = Attribute::findOrFail($request->id); 41 | 42 | return response()->json($attribute->values); 43 | } 44 | 45 | /** 46 | * @param Request $request 47 | * @return \Illuminate\Http\JsonResponse 48 | */ 49 | public function addAttribute(Request $request) 50 | { 51 | $productAttribute = ProductAttribute::create($request->data); 52 | 53 | if ($productAttribute) { 54 | return response()->json(['message' => 'Product attribute added successfully.']); 55 | } else { 56 | return response()->json(['message' => 'Something went wrong while submitting product attribute.']); 57 | } 58 | } 59 | 60 | /** 61 | * @param Request $request 62 | * @return \Illuminate\Http\JsonResponse 63 | */ 64 | public function deleteAttribute(Request $request) 65 | { 66 | $productAttribute = ProductAttribute::findOrFail($request->id); 67 | $productAttribute->delete(); 68 | 69 | return response()->json(['status' => 'success', 'message' => 'Product attribute deleted successfully.']); 70 | } 71 | } -------------------------------------------------------------------------------- /public/frontend/plugins/slickslider/fonts/slick.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Generated by Fontastic.me 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /resources/views/admin/settings/includes/footer_seo.blade.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | @csrf 4 |

    Footer & SEO

    5 |
    6 |
    7 |
    8 | 9 | 16 |
    17 |
    18 | 19 | 27 |
    28 |
    29 | 30 | 37 |
    38 |
    39 | 46 |
    47 |
    -------------------------------------------------------------------------------- /resources/views/admin/partials/sidebar.blade.php: -------------------------------------------------------------------------------- 1 | 2 |
    3 |
    -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | expectsJson()){ 68 | response()->json(['message' => $exception->getMessage()], 401); 69 | } 70 | 71 | $guard = Arr::get($exception->guards(), 0); 72 | 73 | switch ($guard) { 74 | case 'admin': 75 | $login = 'admin.login'; 76 | break; 77 | 78 | default: 79 | $login = 'login'; 80 | break; 81 | } 82 | 83 | return redirect()->guest(route($login)); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /resources/views/admin/brands/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('admin.app') 2 | @section('title') {{ $pageTitle }} @endsection 3 | @section('content') 4 |
    5 |
    6 |

    {{ $pageTitle }}

    7 |
    8 |
    9 | @include('admin.partials.flash') 10 | 11 |
    12 |
    13 |
    14 |

    {{ $subTitle }}

    15 | 16 |
    17 | @csrf 18 |
    19 |
    20 | 21 | 22 | 23 | 24 | @error('name') 25 |
    26 | {{ $message }} 27 |
    28 | @enderror 29 |
    30 | 31 |
    32 |
    33 | @if($brand->logo != null) 34 |
    35 |
    36 | {{ $brand->name }} 37 |
    38 |
    39 | @endif 40 | 50 |
    51 |
    52 | 53 | 60 |
    61 |
    62 |
    63 |
    64 |
    65 | @endsection -------------------------------------------------------------------------------- /public/backend/js/plugins/jquery.vmap.sampledata.js: -------------------------------------------------------------------------------- 1 | var sample_data = {"af":"16.63","al":"11.58","dz":"158.97","ao":"85.81","ag":"1.1","ar":"351.02","am":"8.83","au":"1219.72","at":"366.26","az":"52.17","bs":"7.54","bh":"21.73","bd":"105.4","bb":"3.96","by":"52.89","be":"461.33","bz":"1.43","bj":"6.49","bt":"1.4","bo":"19.18","ba":"16.2","bw":"12.5","br":"2023.53","bn":"11.96","bg":"44.84","bf":"8.67","bi":"1.47","kh":"11.36","cm":"21.88","ca":"1563.66","cv":"1.57","cf":"2.11","td":"7.59","cl":"199.18","cn":"5745.13","co":"283.11","km":"0.56","cd":"12.6","cg":"11.88","cr":"35.02","ci":"22.38","hr":"59.92","cy":"22.75","cz":"195.23","dk":"304.56","dj":"1.14","dm":"0.38","do":"50.87","ec":"61.49","eg":"216.83","sv":"21.8","gq":"14.55","er":"2.25","ee":"19.22","et":"30.94","fj":"3.15","fi":"231.98","fr":"2555.44","ga":"12.56","gm":"1.04","ge":"11.23","de":"3305.9","gh":"18.06","gr":"305.01","gd":"0.65","gt":"40.77","gn":"4.34","gw":"0.83","gy":"2.2","ht":"6.5","hn":"15.34","hk":"226.49","hu":"132.28","is":"12.77","in":"1430.02","id":"695.06","ir":"337.9","iq":"84.14","ie":"204.14","il":"201.25","it":"2036.69","jm":"13.74","jp":"5390.9","jo":"27.13","kz":"129.76","ke":"32.42","ki":"0.15","kr":"986.26","undefined":"5.73","kw":"117.32","kg":"4.44","la":"6.34","lv":"23.39","lb":"39.15","ls":"1.8","lr":"0.98","ly":"77.91","lt":"35.73","lu":"52.43","mk":"9.58","mg":"8.33","mw":"5.04","my":"218.95","mv":"1.43","ml":"9.08","mt":"7.8","mr":"3.49","mu":"9.43","mx":"1004.04","md":"5.36","mn":"5.81","me":"3.88","ma":"91.7","mz":"10.21","mm":"35.65","na":"11.45","np":"15.11","nl":"770.31","nz":"138","ni":"6.38","ne":"5.6","ng":"206.66","no":"413.51","om":"53.78","pk":"174.79","pa":"27.2","pg":"8.81","py":"17.17","pe":"153.55","ph":"189.06","pl":"438.88","pt":"223.7","qa":"126.52","ro":"158.39","ru":"1476.91","rw":"5.69","ws":"0.55","st":"0.19","sa":"434.44","sn":"12.66","rs":"38.92","sc":"0.92","sl":"1.9","sg":"217.38","sk":"86.26","si":"46.44","sb":"0.67","za":"354.41","es":"1374.78","lk":"48.24","kn":"0.56","lc":"1","vc":"0.58","sd":"65.93","sr":"3.3","sz":"3.17","se":"444.59","ch":"522.44","sy":"59.63","tw":"426.98","tj":"5.58","tz":"22.43","th":"312.61","tl":"0.62","tg":"3.07","to":"0.3","tt":"21.2","tn":"43.86","tr":"729.05","tm":0,"ug":"17.12","ua":"136.56","ae":"239.65","gb":"2258.57","us":"14624.18","uy":"40.71","uz":"37.72","vu":"0.72","ve":"285.21","vn":"101.99","ye":"30.02","zm":"15.69","zw":"5.57"}; -------------------------------------------------------------------------------- /resources/views/admin/settings/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('admin.app') 2 | 3 | @section('title') {{ $pageTitle }} @endsection 4 | 5 | @section('content') 6 |
    7 |
    8 |

    {{ $pageTitle }}

    9 |
    10 |
    11 | @include('admin.partials.flash') 12 |
    13 |
    14 |
    15 | 23 |
    24 |
    25 |
    26 |
    27 |
    28 | @include('admin.settings.includes.general') 29 |
    30 | 33 | 36 | 39 |
    40 | @include('admin.settings.includes.analytics') 41 |
    42 |
    43 | @include('admin.settings.includes.payments') 44 |
    45 |
    46 |
    47 |
    48 | @endsection -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | window._ = require('lodash'); 2 | 3 | /** 4 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support 5 | * for JavaScript based Bootstrap features such as modals and tabs. This 6 | * code may be modified to fit the specific needs of your application. 7 | */ 8 | 9 | window.Vue = require('vue'); 10 | 11 | Vue.component('attribute-values', require('./components/AttributeValues.vue').default); 12 | Vue.component('product-attributes', require('./components/ProductAttributes.vue').default); 13 | 14 | /** 15 | * We'll load the axios HTTP library which allows us to easily issue requests 16 | * to our Laravel back-end. This library automatically handles sending the 17 | * CSRF token as a header based on the value of the "XSRF" token cookie. 18 | */ 19 | 20 | window.axios = require('axios'); 21 | 22 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 23 | 24 | /** 25 | * Next we will register the CSRF Token as a common header with Axios so that 26 | * all outgoing HTTP requests automatically have it attached. This is just 27 | * a simple convenience so we don't have to attach every token manually. 28 | */ 29 | 30 | let token = document.head.querySelector('meta[name="csrf-token"]'); 31 | 32 | if (token) { 33 | window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; 34 | } else { 35 | console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token'); 36 | } 37 | 38 | /** 39 | * The following block of code may be used to automatically register your 40 | * Vue components. It will recursively scan this directory for the Vue 41 | * components and automatically register them with their "basename". 42 | * 43 | * Eg. ./components/ExampleComponent.vue -> 44 | */ 45 | 46 | // const files = require.context('./', true, /\.vue$/i); 47 | // files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default)); 48 | 49 | import VueSwal from 'vue-swal'; 50 | Vue.use(VueSwal); 51 | 52 | //Vue.component('example-component', require('./components/ExampleComponent.vue').default); 53 | 54 | /** 55 | * Next, we will create a fresh Vue application instance and attach it to 56 | * the page. Then, you may begin adding components to this application 57 | * or customize the JavaScript scaffolding to fit your unique needs. 58 | */ 59 | 60 | const app = new Vue({ 61 | el: '#app' 62 | }); -------------------------------------------------------------------------------- /public/frontend/plugins/slickslider/slick.css: -------------------------------------------------------------------------------- 1 | /* Slider */ 2 | .slick-slider 3 | { 4 | position: relative; 5 | 6 | display: block; 7 | box-sizing: border-box; 8 | 9 | -webkit-user-select: none; 10 | -moz-user-select: none; 11 | -ms-user-select: none; 12 | user-select: none; 13 | 14 | -webkit-touch-callout: none; 15 | -khtml-user-select: none; 16 | -ms-touch-action: pan-y; 17 | touch-action: pan-y; 18 | -webkit-tap-highlight-color: transparent; 19 | } 20 | 21 | .slick-list 22 | { 23 | position: relative; 24 | 25 | display: block; 26 | overflow: hidden; 27 | 28 | margin: 0; 29 | padding: 0; 30 | } 31 | .slick-list:focus 32 | { 33 | outline: none; 34 | } 35 | .slick-list.dragging 36 | { 37 | cursor: pointer; 38 | cursor: hand; 39 | } 40 | 41 | .slick-slider .slick-track, 42 | .slick-slider .slick-list 43 | { 44 | -webkit-transform: translate3d(0, 0, 0); 45 | -moz-transform: translate3d(0, 0, 0); 46 | -ms-transform: translate3d(0, 0, 0); 47 | -o-transform: translate3d(0, 0, 0); 48 | transform: translate3d(0, 0, 0); 49 | } 50 | 51 | .slick-track 52 | { 53 | position: relative; 54 | top: 0; 55 | left: 0; 56 | 57 | display: block; 58 | margin-left: auto; 59 | margin-right: auto; 60 | } 61 | .slick-track:before, 62 | .slick-track:after 63 | { 64 | display: table; 65 | 66 | content: ''; 67 | } 68 | .slick-track:after 69 | { 70 | clear: both; 71 | } 72 | .slick-loading .slick-track 73 | { 74 | visibility: hidden; 75 | } 76 | 77 | .slick-slide 78 | { 79 | display: none; 80 | float: left; 81 | 82 | height: 100%; 83 | min-height: 1px; 84 | } 85 | [dir='rtl'] .slick-slide 86 | { 87 | float: right; 88 | } 89 | .slick-slide img 90 | { 91 | display: block; width:100%; 92 | } 93 | .slick-slide.slick-loading img 94 | { 95 | display: none; 96 | } 97 | .slick-slide.dragging img 98 | { 99 | pointer-events: none; 100 | } 101 | .slick-initialized .slick-slide 102 | { 103 | display: block; 104 | } 105 | .slick-loading .slick-slide 106 | { 107 | visibility: hidden; 108 | } 109 | .slick-vertical .slick-slide 110 | { 111 | display: block; 112 | 113 | height: auto; 114 | 115 | border: 1px solid transparent; 116 | } 117 | .slick-arrow.slick-hidden { 118 | display: none; 119 | } 120 | -------------------------------------------------------------------------------- /database/seeds/SettingsTableSeeder.php: -------------------------------------------------------------------------------- 1 | 'site_name', 11 | 'value' => 'E-Commerce App' 12 | ], 13 | [ 14 | 'key' => 'site_title', 15 | 'value' => 'E-Commerce' 16 | ], 17 | [ 18 | 'key' => 'default_email_address', 19 | 'value' => 'admin@admin.com' 20 | ], 21 | [ 22 | 'key' => 'currency_code', 23 | 'value' => 'GBP' 24 | ], 25 | [ 26 | 'key' => 'currency_symbol', 27 | 'value' => '£' 28 | ], 29 | [ 30 | 'key' => 'site_logo', 31 | 'value' => '' 32 | ], 33 | [ 34 | 'key' => 'site_favicon', 35 | 'value' => '' 36 | ], 37 | [ 38 | 'key' => 'footer_copyright_text', 39 | 'value' => '' 40 | ], 41 | [ 42 | 'key' => 'seo_meta_title', 43 | 'value' => '' 44 | ], 45 | [ 46 | 'key' => 'seo_meta_description', 47 | 'value' => '' 48 | ], 49 | [ 50 | 'key' => 'social_facebook', 51 | 'value' => '' 52 | ], 53 | [ 54 | 'key' => 'social_twitter', 55 | 'value' => '' 56 | ], 57 | [ 58 | 'key' => 'social_instagram', 59 | 'value' => '' 60 | ], 61 | [ 62 | 'key' => 'social_linkedin', 63 | 'value' => '' 64 | ], 65 | [ 66 | 'key' => 'google_analytics', 67 | 'value' => '' 68 | ], 69 | [ 70 | 'key' => 'facebook_pixels', 71 | 'value' => '' 72 | ], 73 | [ 74 | 'key' => 'stripe_payment_method', 75 | 'value' => '' 76 | ], 77 | [ 78 | 'key' => 'stripe_key', 79 | 'value' => '' 80 | ], 81 | [ 82 | 'key' => 'stripe_secret_key', 83 | 'value' => '' 84 | ], 85 | [ 86 | 'key' => 'paypal_payment_method', 87 | 'value' => '' 88 | ], 89 | [ 90 | 'key' => 'paypal_client_id', 91 | 'value' => '' 92 | ], 93 | [ 94 | 'key' => 'paypal_secret_id', 95 | 'value' => '' 96 | ], 97 | 98 | ]; 99 | 100 | 101 | /** 102 | * Run the database seeds. 103 | * 104 | * @return void 105 | */ 106 | public function run() 107 | { 108 | foreach($this->settings as $index => $setting){ 109 | $result = Setting::create($setting); 110 | if(!$result){ 111 | $this->command->info("Insert failed at record $index. "); 112 | return; 113 | } 114 | } 115 | $this->command->info('Inserted '.count($this->settings). ' records'); 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /resources/views/admin/attributes/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('admin.app') 2 | @section('title') {{ $pageTitle }} @endsection 3 | @section('content') 4 |
    5 |
    6 |

    {{ $pageTitle }}

    7 |

    {{ $subTitle }}

    8 |
    9 | Add Attribute 10 |
    11 | 12 | @include('admin.partials.flash') 13 |
    14 |
    15 |
    16 |
    17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | @foreach($attributes as $attribute) 30 | 31 | 32 | 33 | 34 | 41 | 48 | 54 | 55 | @endforeach 56 | 57 |
    Code Name Frontend Type Filterable Required
    {{ $attribute->code }} {{ $attribute->name }} {{ $attribute->frontend_type }} 35 | @if($attribute->is_filterable ==1) 36 | Yes 37 | @else 38 | No 39 | @endif 40 | 42 | @if($attribute->is_required ==1) 43 | Yes 44 | @else 45 | No 46 | @endif 47 | 49 |
    50 | 51 | 52 |
    53 |
    58 |
    59 |
    60 |
    61 |
    62 | @endsection 63 | @push('scripts') 64 | 65 | 66 | 67 | 68 | @endpush -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Laravel eCommerce (Complete Project) 2 | 3 | comming soon..... 4 | 5 | **Version**: 1.0 Release of the Laravel eCommerce. 6 | 7 | --- 8 | 9 | ## Table of Contents 10 | 11 | - [Overview](#overview) 12 | - [Problem Domain Area](#problem-Domain-Area) 13 | - [The Advantages of System](#The-Advantages-of-System) 14 | - [The Limitations of System](#The-Limitations-of-System) 15 | - [The System Features List](#Aims-and-Objectives) 16 | - [Entity Relationship Diagram (ERD)](#Entity-Relationship-Diagram) 17 | - [Technologies and Libraries](#technologies-and-libraries) 18 | - [Further Development](#further-development) 19 | - [How to run the System](#how-to-run-the-system) 20 | - [Questions and Answers](#questions-and-answers) 21 | - [Summary](#summary) 22 | - [References](#references) 23 | 24 | --- 25 | 26 | ## Overview 27 | 28 | comming soon. 29 | 30 | ## Problem Domain Area 31 | 32 | - comming soon 33 | 34 | ## The Advantages of System 35 | 36 | - comming soon. 37 | 38 | ## The Limitations of System 39 | 40 | - still working. 41 | 42 | ## Aims and Objectives 43 | - comming soon. 44 | 45 | ## Entity-Relationship-Diagram 46 | 47 | ![arc](erd_diagram.jpg?raw=true 'ERD_Diagram') 48 | 49 | ## Technologies and libraries 50 | 51 | - Laravel 7+, PHP 7+. 52 | - JavaScript & VueJS Framework. 53 | - Bootstrap eCommerce UI Kit for frontend design 54 | - Vali Admin for backend design 55 | - MySQL for local 56 | - PgSQL for heroku deploy 57 | 58 | ## Further Development 59 | 60 | - comming soon. 61 | 62 | ## How to run the System 63 | 64 | ### Run on the development environment 65 | 66 | - Open terminal window with your dev area 67 | - Then run this below comments 68 | 69 | ```sh 70 | $ git clone https://github.com/vorsurm/LaravelEcommerce.git 71 | 72 | $ cd LaravelEcommerce 73 | $ composer install 74 | $ cp .env.example .env 75 | $ php artisan key:generate 76 | $ config .env file, below description 77 | $ php artisan migrate 78 | $ php artisan serve 79 | $ It`s open a browser window with http://localhost:8000/login 80 | 81 | ``` 82 | 83 | ### Configure environment variables 84 | 85 | - Add the .env variable name of the following below information. 86 | 87 | ``` 88 | 89 | MySQL Config: 90 | ============== 91 | DB_CONNECTION=mysql 92 | DB_HOST=127.0.0.1 93 | DB_PORT=3306 94 | DB_DATABASE=LaravelEcommerce 95 | DB_USERNAME=username 96 | DB_PASSWORD=password 97 | 98 | 99 | ``` 100 | 101 | - Browser opens up and runs with URL: `http://localhost:8000` 102 | - configure your own style . 103 | 104 | --- 105 | 106 | -------------------------------------------------------------------------------- /resources/views/admin/products/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('admin.app') 2 | @section('title') {{ $pageTitle }} @endsection 3 | @section('content') 4 |
    5 |

    {{ $pageTitle }}

    6 | Add Product 7 |
    8 | @include('admin.partials.flash') 9 |
    10 |
    11 |
    12 |
    13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | 28 | 29 | 30 | @foreach($products as $product) 31 | 32 | 33 | 34 | 35 | 36 | 41 | 42 | 47 | 55 | 56 | @endforeach 57 | 58 |
    # SKU Name Brand Categories Price Status 24 | 25 |
    {{ $loop->iteration }} {{ $product->sku }} {{ $product->name }} {{ $product->brand->name }} 37 | @foreach($product->categories as $category) 38 | {{ $category->name }} 39 | @endforeach 40 | {{ $product->price }} 43 | 44 | {{ $product->status == 1 ? 'Active' : 'Not Active' }} 45 | 46 | 48 |
    49 | 50 | 51 |
    52 | 53 | 54 |
    59 |
    60 |
    61 |
    62 |
    63 | @endsection 64 | @push('scripts') 65 | 66 | 67 | 68 | @endpush -------------------------------------------------------------------------------- /app/Repositories/BrandRepository.php: -------------------------------------------------------------------------------- 1 | model = $model; 20 | } 21 | 22 | public function listBrands(string $order = 'id', string $sort = 'desc', array $columns = ['*']) { 23 | \Log::info("Req=Repositories/BrandRepository@listBrands called"); 24 | 25 | return $this->all($columns, $order, $sort); 26 | } 27 | 28 | public function createBrand(array $params){ 29 | \Log::info("Req=Repositories/BrandRepository@createBrand called"); 30 | 31 | try { 32 | $collection = collect($params); 33 | 34 | $logo = null; 35 | 36 | if($collection->has('logo') && ($params['logo'] instanceof UploadedFile )){ 37 | $logo = $this->uploadOne($params['logo'], 'brands'); 38 | } 39 | 40 | $merge = $collection->merge(compact('logo')); 41 | $brand = new Brand($merge->all()); 42 | $brand->save(); 43 | return $brand; 44 | 45 | } catch (QueryException $e) { 46 | throw new InvalidArgumentException($e->getMessage()); 47 | 48 | } 49 | } 50 | 51 | 52 | public function findBrandById($id){ 53 | \Log::info("Req=Repositories/BrandRepository@findBrandById called"); 54 | 55 | try { 56 | return $this->findOneOrFail($id); 57 | } catch (ModelNotFoundException $e) { 58 | throw new ModelNotFoundException($e); 59 | } 60 | } 61 | 62 | public function updateBrand($params){ 63 | \Log::info("Req=Repositories/BrandRepository@updateBrand called"); 64 | $brand = $this->findBrandById($params['id']); 65 | $collection = collect($params)->except('_token'); 66 | 67 | if($collection->has('logo') && ($params['logo'] instanceof UploadedFile)){ 68 | if($brand->logo != null){ 69 | $this->deleteOne($brand->logo); 70 | } 71 | $logo = $this->uploadOne($params['logo'], 'brands'); 72 | } 73 | $merge = $collection->merge(compact('logo')); 74 | $brand->update($merge->all()); 75 | return $brand; 76 | 77 | } 78 | 79 | public function deleteBrand($id){ 80 | \Log::info("Req=Repositories/BrandRepository@deleteBrand called"); 81 | $brand = $this->findBrandById($id); 82 | if($brand->logo != null){ 83 | $this->deleteOne($brand->logo); 84 | } 85 | $brand->delete(); 86 | 87 | return $brand; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /resources/views/admin/settings/includes/logo.blade.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | @csrf 4 |

    Site Logo

    5 |
    6 |
    7 |
    8 |
    9 | @if (config('settings.site_logo') != null) 10 | 11 | @else 12 | 13 | @endif 14 |
    15 |
    16 |
    17 | 18 | 19 |
    20 |
    21 |
    22 |
    23 |
    24 | @if (config('settings.site_favicon') != null) 25 | 26 | @else 27 | 28 | @endif 29 |
    30 |
    31 |
    32 | 33 | 34 |
    35 |
    36 |
    37 |
    38 | 45 |
    46 |
    47 | @push('scripts') 48 | 54 | @endpush --------------------------------------------------------------------------------