├── .DS_Store ├── .gitattributes ├── .gitignore ├── LICENSE ├── Procfile ├── Vagrantfile ├── after.sh ├── aliases ├── app ├── .DS_Store ├── Address.php ├── Category.php ├── Console │ ├── Commands │ │ ├── CreateAdminInDB.php │ │ ├── CreateEnvFile.php │ │ └── CreateProducts.php │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Http │ ├── .DS_Store │ ├── Controllers │ │ ├── .DS_Store │ │ ├── Admin │ │ │ ├── .DS_Store │ │ │ ├── API │ │ │ │ ├── CategoriesAPIController.php │ │ │ │ ├── OrdersAPIController.php │ │ │ │ ├── ProductsAPIController.php │ │ │ │ ├── StatesAPIController.php │ │ │ │ └── TaxesAPIController.php │ │ │ ├── AbstractAdminController.php │ │ │ ├── AdminHomeController.php │ │ │ ├── CategoriesController.php │ │ │ ├── OrdersController.php │ │ │ ├── ProductsController.php │ │ │ ├── SalesController.php │ │ │ ├── StatesController.php │ │ │ ├── TaxesController.php │ │ │ └── UsersController.php │ │ ├── Auth │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── RegisterController.php │ │ │ ├── RegisterValidationController.php │ │ │ └── ResetPasswordController.php │ │ ├── Controller.php │ │ ├── HomeController.php │ │ ├── RoleController.php │ │ ├── Traits │ │ │ └── APIControllerTrait.php │ │ └── User │ │ │ ├── API │ │ │ ├── AbstractUserAPIController.php │ │ │ ├── AddressController.php │ │ │ ├── BillingController.php │ │ │ ├── OrderController.php │ │ │ ├── SearchController.php │ │ │ ├── ShoppingCartController.php │ │ │ ├── StateController.php │ │ │ └── UserController.php │ │ │ ├── OrderController.php │ │ │ ├── ProductsController.php │ │ │ ├── SearchController.php │ │ │ ├── UserAccountController.php │ │ │ └── UserPagesController.php │ ├── Kernel.php │ ├── Middleware │ │ ├── AjaxRequestMiddleware.php │ │ ├── AjaxUserNotLoggedInRequest.php │ │ ├── EncryptCookies.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── RedirectIfNotAdmin.php │ │ ├── RedirectIfRole.php │ │ ├── TrimStrings.php │ │ └── VerifyCsrfToken.php │ └── Requests │ │ ├── BillingFormRequest.php │ │ ├── CategoryFormRequest.php │ │ ├── ProductFormRequest.php │ │ ├── RegisterUserRequest.php │ │ ├── SalesFormRequest.php │ │ ├── ShipOrderRequest.php │ │ ├── StatesFormRequest.php │ │ ├── TaxFormRequest.php │ │ ├── UserAddressRequest.php │ │ └── UserOrderRequest.php ├── Image.php ├── Library │ ├── .DS_Store │ ├── API │ │ ├── ApiResponseTracker.php │ │ ├── ErrorTracker │ │ │ ├── AbstractErrorTracker.php │ │ │ ├── AddressErrorTracker.php │ │ │ ├── ErrorTrackerInterface.php │ │ │ └── OrderErrorTracker.php │ │ └── ErrorTrackerBuilder │ │ │ └── OrderErrorTrackerBuilder.php │ ├── Data │ │ ├── AdminUrlData.php │ │ ├── FetchJsonFile.php │ │ └── UrlData.php │ ├── Database │ │ ├── .DS_Store │ │ ├── ImageDatabase.php │ │ ├── ImageUploadDatabase.php │ │ ├── Processors │ │ │ └── ProductDBProcessor.php │ │ └── ProductDatabase.php │ ├── Files │ │ ├── .DS_Store │ │ ├── Names │ │ │ └── ThumbnailFileNames.php │ │ └── Resize │ │ │ ├── ImageDimensions.php │ │ │ └── ResizeImageClass.php │ ├── Format │ │ ├── DateFormat.php │ │ └── SalesDateFormat.php │ ├── Order │ │ ├── OrderDatabase.php │ │ └── ShippingDateEstimator.php │ ├── ShoppingCart │ │ ├── AbstractShoppingCart.php │ │ ├── ShoppingCartAdd.php │ │ ├── ShoppingCartInterface.php │ │ ├── ShoppingCartRemove.php │ │ └── ShoppingCartUpdate.php │ └── Transformer │ │ ├── AbstractTransformer.php │ │ ├── AddressTransformer.php │ │ ├── OrderTransformers.php │ │ ├── ProductsTransformer.php │ │ ├── SalesTransformer.php │ │ ├── ShoppingCartTransformer.php │ │ ├── UserAccountTransformer.php │ │ └── UserTransformer.php ├── Order.php ├── Product.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ ├── NavBarServiceProvider.php │ ├── RouteServiceProvider.php │ ├── SideBarServiceProvider.php │ └── ValidationServiceProvider.php ├── Review.php ├── Role.php ├── Sale.php ├── State.php ├── Tax.php └── User.php ├── artisan ├── bootstrap ├── app.php ├── autoload.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── database.php ├── filesystems.php ├── mail.php ├── queue.php ├── scout.php ├── services.php ├── session.php ├── shoppingCart.php └── view.php ├── database ├── .DS_Store ├── .gitignore ├── data │ ├── products.json │ ├── reviews.json │ ├── taxes.json │ └── users.json ├── factories │ └── ModelFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2017_03_23_065358_create_catagories_table.php │ ├── 2017_03_23_065633_create_roles_table.php │ ├── 2017_03_23_074747_role_user.php │ ├── 2017_05_18_120354_create_images_table.php │ ├── 2017_06_15_000704_create_states_table.php │ ├── 2017_06_21_110618_create_taxes_table.php │ ├── 2017_07_19_043056_create_products_table.php │ ├── 2017_07_19_043413_create_sales_table.php │ ├── 2017_07_19_043530_create_reviews__table.php │ ├── 2017_07_19_044050_create_address_table.php │ ├── 2017_07_19_045536_create_order_table.php │ └── 2017_07_19_045709_create_order_product_pivot_table.php └── seeds │ ├── AddressTableSeeder.php │ ├── CategoryTableSeeder.php │ ├── DatabaseSeeder.php │ ├── OrderTableSeeder.php │ ├── ProductTableSeeder.php │ ├── ReviewTableSeeder.php │ ├── RoleTableSeeder.php │ ├── SaleTableSeeder.php │ ├── SeedImageTable.php │ ├── StateTableSeeder.php │ ├── TaxTableSeeder.php │ └── UserTableSeeder.php ├── demo ├── .DS_Store ├── laracommer-home_tn.png └── laracommerce-show-item_tn.png ├── gulpfile.js ├── package.json ├── phpunit.dusk.xml ├── phpunit.xml ├── public ├── .DS_Store ├── .htaccess ├── css │ ├── admin.602047d9651eb4c3294f49dc0e10c41a.css │ ├── admin.7d45e03f90a997d9cd1774d1d5dcd050.css │ ├── admin.c09e659f86992aae2bfc3dc5ded23303.css │ ├── admin.d3a0ad8068be394acc32016c9520ad8e.css │ ├── app.0933c53cf1525471839ecb9c76040223.css │ ├── app.54d01adaaf05df18dcc89715b9e08e91.css │ ├── app.634163b85e68bc166411826b9d02bad3.css │ └── app.c99a501f20d18e0c0704f347e71f521b.css ├── favicon.ico ├── fonts │ ├── FontAwesome.otf │ ├── bootstrap │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ ├── fontawesome-webfont.woff2 │ └── vendor │ │ ├── bootstrap-sass │ │ └── bootstrap │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ └── font-awesome │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 ├── images │ ├── headerimage.jpg │ ├── headerimage2.jpg │ ├── headerimagescale.jpg │ ├── headerimagescale2.jpg │ └── products │ │ ├── .DS_Store │ │ ├── accessory-analog-classic.jpg │ │ ├── accessory-analog-classic_tn.jpg │ │ ├── accessory-classic-close-up.jpg │ │ ├── accessory-classic-close-up_tn.jpg │ │ ├── analog-watch-black-and-white-reflection.jpg │ │ ├── analog-watch-black-and-white-reflection_tn.jpg │ │ ├── analogue-color-executive.jpg │ │ ├── analogue-color-executive_tn.jpg │ │ ├── background-bright-close-up.jpg │ │ ├── background-bright-close-up_tn.jpg │ │ ├── black-and-white-coach-design.jpg │ │ ├── black-and-white-coach-design_tn.jpg │ │ ├── black-camera-dslr.jpg │ │ ├── black-camera-dslr_tn.jpg │ │ ├── black-classic-clothes.jpg │ │ ├── black-classic-clothes_tn.jpg │ │ ├── blur-blurred-background-bottle.jpg │ │ ├── blur-blurred-background-bottle_tn.jpg │ │ ├── blur-brush-close-up.jpg │ │ ├── blur-brush-close-up_tn.jpg │ │ ├── blur-business-close-up.jpg │ │ ├── blur-business-close-up_tn.jpg │ │ ├── blurred-background-book-shelves-books.jpg │ │ ├── blurred-background-book-shelves-books_tn.jpg │ │ ├── bottle-container-glass.jpg │ │ ├── bottle-container-glass_tn.jpg │ │ ├── camera-digicam-digital-camera.jpg │ │ ├── camera-digicam-digital-camera_tn.jpg │ │ ├── camera-dslr-electronics.jpg │ │ ├── camera-dslr-electronics_tn.jpg │ │ ├── fashion-footwear-shoes.jpg │ │ ├── fashion-footwear-shoes_tn.jpg │ │ ├── footwear-shoe-sneakers.jpg │ │ └── footwear-shoe-sneakers_tn.jpg ├── index.php ├── js │ ├── admin.26ba64c1595e5bf3fa4c.js │ ├── admin.72c64c6af6a952bb60df.js │ ├── admin.8984a0e60048730d340d.js │ ├── admin.c5f65e6a1c0f6e4d2a1d.js │ ├── admin.c9c3f8c9ff1d99520eb1.js │ ├── app.1305473b80cc2a193b7d.js │ ├── app.3c23ba8966c1e7320983.js │ ├── app.5c927d40219b12677d46.js │ ├── app.afd7b1bce4fef0ff1ef0.js │ ├── app.b249f2a9a093ae4227d3.js │ ├── app.js │ └── app.js.map ├── mix-manifest.json ├── robots.txt └── web.config ├── readme.md ├── resources ├── .DS_Store ├── assets │ ├── .DS_Store │ ├── js │ │ ├── .DS_Store │ │ ├── admin.js │ │ ├── app.js │ │ ├── bootstrap.js │ │ └── components │ │ │ ├── .DS_Store │ │ │ ├── account │ │ │ ├── address-box.vue │ │ │ ├── user-account-address.vue │ │ │ ├── user-account-header.vue │ │ │ ├── user-account-order.vue │ │ │ └── user-account.vue │ │ │ ├── admin-main-page.vue │ │ │ ├── admin │ │ │ ├── .DS_Store │ │ │ ├── categories │ │ │ │ ├── categories-table.vue │ │ │ │ ├── category-form.vue │ │ │ │ ├── category-row.vue │ │ │ │ ├── delete-category-button.vue │ │ │ │ └── edit-category-button.vue │ │ │ ├── orders │ │ │ │ ├── ship-order.vue │ │ │ │ └── view-order.vue │ │ │ ├── products │ │ │ │ ├── delete-product-form.vue │ │ │ │ ├── product-form.vue │ │ │ │ ├── product-row.vue │ │ │ │ ├── product-table.vue │ │ │ │ └── view-product.vue │ │ │ ├── sales │ │ │ │ ├── sale-form.vue │ │ │ │ └── view-sale-details.vue │ │ │ ├── states │ │ │ │ ├── state-row.vue │ │ │ │ ├── states-form.vue │ │ │ │ └── states-tables.vue │ │ │ └── taxes │ │ │ │ ├── delete-tax-button.vue │ │ │ │ ├── tax-form.vue │ │ │ │ ├── tax-row.vue │ │ │ │ └── tax-table.vue │ │ │ ├── auth │ │ │ ├── login-form.vue │ │ │ └── registration-form.vue │ │ │ ├── functionality │ │ │ ├── .DS_Store │ │ │ ├── animations │ │ │ │ ├── fade-out-animation.vue │ │ │ │ └── slide-in-animation.vue │ │ │ ├── form │ │ │ │ └── input-date.vue │ │ │ ├── messages │ │ │ │ ├── error-message.vue │ │ │ │ └── success-message.vue │ │ │ ├── modal │ │ │ │ ├── confirm-modal.vue │ │ │ │ ├── form-modal.vue │ │ │ │ ├── message-modal.vue │ │ │ │ └── view-details-modal.vue │ │ │ ├── paginate-items.vue │ │ │ ├── review-stars.vue │ │ │ ├── screen │ │ │ │ └── full-screen.vue │ │ │ ├── select-cart-quantity.vue │ │ │ └── view-message.vue │ │ │ ├── main-page.vue │ │ │ ├── main-shopping-cart.vue │ │ │ ├── navbar │ │ │ ├── categories-navbar.vue │ │ │ ├── navbar-cart.vue │ │ │ ├── search-products-screen.vue │ │ │ └── search-products.vue │ │ │ ├── order │ │ │ ├── .DS_Store │ │ │ ├── address │ │ │ │ └── select-user-address.vue │ │ │ ├── confirm-cart │ │ │ │ ├── order-information.vue │ │ │ │ └── user-order-item.vue │ │ │ ├── invoice │ │ │ │ └── user-order.vue │ │ │ ├── order-details.vue │ │ │ ├── order-page.vue │ │ │ ├── payment │ │ │ │ ├── billing-form.vue │ │ │ │ └── order-payment.vue │ │ │ ├── shared │ │ │ │ ├── order-total-details.vue │ │ │ │ └── user-order-header.vue │ │ │ └── step-progress-bar.vue │ │ │ ├── shared-information │ │ │ ├── .DS_Store │ │ │ ├── address │ │ │ │ ├── add-new-address.vue │ │ │ │ ├── delete-address.vue │ │ │ │ ├── edit-address.vue │ │ │ │ ├── shipping-address.vue │ │ │ │ ├── user-address-form.vue │ │ │ │ └── user-address.vue │ │ │ ├── order │ │ │ │ └── order-list-item.vue │ │ │ └── user-details.vue │ │ │ └── shopping-cart │ │ │ ├── add-cart-icon.vue │ │ │ └── remove-item-icon.vue │ └── sass │ │ ├── _variables.scss │ │ ├── admin.scss │ │ ├── admin │ │ ├── _custom.scss │ │ ├── _panels.scss │ │ └── _tables.scss │ │ ├── app.scss │ │ ├── ecommerce │ │ ├── _forms.scss │ │ ├── _general.scss │ │ ├── _layout.scss │ │ ├── _modal.scss │ │ ├── _navbar.scss │ │ ├── _order.scss │ │ ├── _payment.scss │ │ ├── _products.scss │ │ └── _search.scss │ │ ├── postcss.config.js │ │ └── shared │ │ └── message.scss ├── lang │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php └── views │ ├── .DS_Store │ ├── _includes │ ├── _admin │ │ ├── _footer.blade.php │ │ ├── _navbar.blade.php │ │ └── _sidebar.blade.php │ └── _ecommerce │ │ ├── _carousel.blade.php │ │ ├── _footer.blade.php │ │ ├── _messages.blade.php │ │ ├── _navbar.blade.php │ │ └── _sidebar.blade.php │ ├── _layout │ ├── _admin.blade.php │ └── _ecommerce.blade.php │ ├── admin │ ├── _includes │ │ ├── _show │ │ │ └── _order.blade.php │ │ └── _tables │ │ │ ├── _categories.blade.php │ │ │ ├── _orders.blade.php │ │ │ ├── _products.blade.php │ │ │ ├── _states.blade.php │ │ │ ├── _taxes.blade.php │ │ │ ├── _users.blade.php │ │ │ ├── _usersAddresses.blade.php │ │ │ └── _usersOrders.blade.php │ ├── home.blade.php │ ├── index.blade.php │ └── show.blade.php │ ├── auth │ ├── login.blade.php │ ├── passwords │ │ ├── email.blade.php │ │ └── reset.blade.php │ └── register.blade.php │ ├── ecommerce │ ├── _includes │ │ └── _products.blade.php │ ├── about.blade.php │ ├── account.blade.php │ ├── accountOrder.blade.php │ ├── contact.blade.php │ ├── order.blade.php │ ├── search.blade.php │ ├── show.blade.php │ └── welcome.blade.php │ └── vendor │ ├── mail │ ├── html │ │ ├── button.blade.php │ │ ├── footer.blade.php │ │ ├── header.blade.php │ │ ├── layout.blade.php │ │ ├── message.blade.php │ │ ├── panel.blade.php │ │ ├── promotion.blade.php │ │ ├── promotion │ │ │ └── button.blade.php │ │ ├── subcopy.blade.php │ │ ├── table.blade.php │ │ └── themes │ │ │ └── default.css │ └── markdown │ │ ├── button.blade.php │ │ ├── footer.blade.php │ │ ├── header.blade.php │ │ ├── layout.blade.php │ │ ├── message.blade.php │ │ ├── panel.blade.php │ │ ├── promotion.blade.php │ │ ├── promotion │ │ └── button.blade.php │ │ ├── subcopy.blade.php │ │ └── table.blade.php │ ├── notifications │ └── email.blade.php │ └── pagination │ ├── bootstrap-4.blade.php │ ├── default.blade.php │ ├── simple-bootstrap-4.blade.php │ └── simple-default.blade.php ├── routes ├── api.php ├── channels.php ├── console.php └── web.php ├── server.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── debugbar │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tests ├── Browser │ ├── AbstractBrowser.php │ ├── Pages │ │ ├── HomePage.php │ │ └── Page.php │ ├── admin │ │ ├── AbstractDuskAdmin.php │ │ ├── categories │ │ │ ├── CreateCategoriesPageTest.php │ │ │ ├── DeleteCategoriesPageTest.php │ │ │ ├── EditCategoriesPageTest.php │ │ │ └── ViewCategoriesPageTest.php │ │ ├── navbar │ │ │ └── AdminLinkTest.php │ │ ├── product │ │ │ ├── CreateNewProductBrowserTest.php │ │ │ ├── DeleteProductTest.php │ │ │ ├── EditProductTest.php │ │ │ └── ViewProductTest.php │ │ ├── sale │ │ │ └── ViewSaleTest.php │ │ └── tax │ │ │ └── TaxAdminTest.php │ ├── auth │ │ ├── AbstractLogin.php │ │ ├── LoginFailedTest.php │ │ ├── LoginFailedValidationTest.php │ │ ├── LoginTest.php │ │ ├── RegisterFailedValidationTest.php │ │ └── RegisterTest.php │ ├── console │ │ └── .gitignore │ ├── includes │ │ ├── AbstractIncludes.php │ │ ├── CategoriesSidebarTest.php │ │ └── NavbarTest.php │ ├── screenshots │ │ └── .gitignore │ └── user │ │ ├── home │ │ ├── AboutPageTest.php │ │ ├── ContactPageTest.php │ │ └── HomePageTest.php │ │ └── order │ │ └── UserOrderTest.php ├── CreatesApplication.php ├── DuskTestCase.php ├── Feature │ ├── acceptance │ │ ├── admin │ │ │ ├── AbstractTestPost.php │ │ │ ├── categories │ │ │ │ ├── CreateCategoriesFailAuthTest.php │ │ │ │ ├── CreateCategoriesFailValidationTest.php │ │ │ │ ├── CreateCategoriesSuccessTest.php │ │ │ │ ├── DeleteCategoriesFailAuthTest.php │ │ │ │ ├── DeleteCategoriesSuccessTest.php │ │ │ │ ├── EditCategoriesFailAuthTest.php │ │ │ │ ├── EditCategoriesSuccessTest.php │ │ │ │ ├── ViewCategoriesAPITest.php │ │ │ │ └── ViewCategoriesPageTest.php │ │ │ ├── product │ │ │ │ ├── AbstractNewProduct.php │ │ │ │ ├── CreateNewProductTest.php │ │ │ │ ├── CreateNewProductWithImageTest.php │ │ │ │ ├── DeleteProductFailAuthTest.php │ │ │ │ ├── DeleteProductSuccessTest.php │ │ │ │ ├── NewProductFailAuthTest.php │ │ │ │ ├── NewProductFailValidationTest.php │ │ │ │ ├── UpdateProductFailAuthTest.php │ │ │ │ ├── UpdateProductFailProductNotExitTest.php │ │ │ │ ├── UpdateProductSuccessTest.php │ │ │ │ ├── UpdateProductWithImageTest.php │ │ │ │ └── ViewProductSuccessTest.php │ │ │ ├── sale │ │ │ │ ├── AbstractTestSale.php │ │ │ │ ├── CreateNewSaleSuccessTest.php │ │ │ │ ├── CreateSaleFailAuthTest.php │ │ │ │ ├── CreateSaleFailValidationTest.php │ │ │ │ ├── EditSaleFailAuthTest.php │ │ │ │ ├── EditSaleSuccessTest.php │ │ │ │ └── ViewSaleSuccessTest.php │ │ │ ├── states │ │ │ │ ├── CreateNewStateFailAuthTest.php │ │ │ │ ├── CreateNewStateFailValidationTest.php │ │ │ │ ├── CreateNewStatesSuccessTest.php │ │ │ │ ├── DeleteStateFailAuthTest.php │ │ │ │ ├── DeleteStateSuccessTest.php │ │ │ │ ├── UpdateStateFailAuthTest.php │ │ │ │ ├── UpdateStateFailValidationTest.php │ │ │ │ ├── UpdateStateSuccessTest.php │ │ │ │ ├── ViewStatesAPITest.php │ │ │ │ └── ViewStatesPageTest.php │ │ │ └── tax │ │ │ │ ├── CreateNewTaxFailAuthTest.php │ │ │ │ ├── CreateNewTaxFailValidationTest.php │ │ │ │ ├── CreateNewTaxSuccessTest.php │ │ │ │ ├── DeleteTaxFailAuthTest.php │ │ │ │ ├── DeleteTaxSuccessTest.php │ │ │ │ ├── UpdateTaxFailAuthTest.php │ │ │ │ ├── UpdateTaxSuccessTest.php │ │ │ │ ├── ViewTaxAPITest.php │ │ │ │ └── ViewTaxPageTest.php │ │ └── http │ │ │ ├── AbstractHttpAjaxTestClass.php │ │ │ ├── AbstractHttpTestClass.php │ │ │ ├── address │ │ │ ├── CreateAddressAuthorizationFailedTest.php │ │ │ ├── CreateAddressSuccessTest.php │ │ │ ├── CreateAddressValidationFailedTest.php │ │ │ ├── DestroyAddressAuthorizationFailedTest.php │ │ │ ├── DestroyAddressSuccessTest.php │ │ │ ├── DestroyAddressWrongUserTest.php │ │ │ ├── GetStatesTest.php │ │ │ ├── UpdateAddressAuthorizationFailedTest.php │ │ │ ├── UpdateAddressFailedValidationTest.php │ │ │ ├── UpdateAddressSuccessTest.php │ │ │ └── UpdateAddressWrongUserTest.php │ │ │ ├── homecontroller │ │ │ ├── AboutPageTest.php │ │ │ ├── ContactPageTest.php │ │ │ └── HomePageTest.php │ │ │ ├── login │ │ │ ├── LoginUserFailedTest.php │ │ │ ├── LoginUserFailedValidationTest.php │ │ │ └── LoginUserSuccessTest.php │ │ │ ├── order │ │ │ ├── payment │ │ │ │ ├── AbstractPayment.php │ │ │ │ ├── failed │ │ │ │ │ ├── AbstractPaymentFailure.php │ │ │ │ │ ├── CardDeclinedTest.php │ │ │ │ │ ├── CardFraudTest.php │ │ │ │ │ ├── CardProcessingErrorTest.php │ │ │ │ │ ├── DiscoverCardFailTest.php │ │ │ │ │ └── HighRiskCardTest.php │ │ │ │ └── success │ │ │ │ │ ├── AbstractPaymentSuccess.php │ │ │ │ │ ├── AmericanCardSuccessTest.php │ │ │ │ │ ├── MasterCardSuccessTest.php │ │ │ │ │ ├── MasterDebitCardSuccessTest.php │ │ │ │ │ ├── VisaCardSuccessTest.php │ │ │ │ │ └── VisaDebitCardSuccessTest.php │ │ │ └── route │ │ │ │ ├── OrderPageInvalidStageTest.php │ │ │ │ ├── OrderPageNotLoggedInTest.php │ │ │ │ ├── OrderPagePreviousOrderTest.php │ │ │ │ ├── OrderPageSuccessConnectTest.php │ │ │ │ ├── create │ │ │ │ ├── AbstractFailedOrder.php │ │ │ │ ├── CreateNewOrderFailedAddressNotFoundTest.php │ │ │ │ ├── CreateNewOrderFailedLoginTest.php │ │ │ │ ├── CreateNewOrderFailedValidationTest.php │ │ │ │ ├── CreateNewOrderFailedWrongAddressTest.php │ │ │ │ └── CreateNewOrderSuccessTest.php │ │ │ │ └── update │ │ │ │ ├── AbstractFailedUpdateOrder.php │ │ │ │ ├── UpdateOrderFailedAddressBelongsUserTest.php │ │ │ │ ├── UpdateOrderFailedAddressExistsTest.php │ │ │ │ ├── UpdateOrderFailedLoginTest.php │ │ │ │ ├── UpdateOrderFailedOrderBelongsUserTest.php │ │ │ │ ├── UpdateOrderFailedValidationTest.php │ │ │ │ └── UpdateOrderSuccessTest.php │ │ │ ├── products │ │ │ ├── ViewProductFailedProductNotExistTest.php │ │ │ └── ViewProductSuccessTest.php │ │ │ ├── register │ │ │ ├── CheckEmailTest.php │ │ │ ├── CheckUserNameTest.php │ │ │ ├── RegisterUserFailedValidationTest.php │ │ │ └── RegisterUserSuccessTest.php │ │ │ ├── search │ │ │ └── route │ │ │ │ ├── ajax │ │ │ │ └── SearchByScoutAjaxRequestTest.php │ │ │ │ └── view │ │ │ │ ├── SearchByCategoryTest.php │ │ │ │ ├── SearchByGetFailedTest.php │ │ │ │ ├── SearchByScoutGetTest.php │ │ │ │ ├── SearchByScoutMaliciousPostTest.php │ │ │ │ └── SearchByScoutPostTest.php │ │ │ ├── shoppingcart │ │ │ ├── ShoppingCartAddSuccessTest.php │ │ │ ├── ShoppingCartAddWrongProductTest.php │ │ │ ├── ShoppingCartGetTest.php │ │ │ ├── ShoppingCartRemoveErrorTest.php │ │ │ ├── ShoppingCartRemoveSuccessTest.php │ │ │ ├── ShoppingCartUpdateErrorTest.php │ │ │ └── ShoppingCartUpdateSuccessTest.php │ │ │ └── viewAccount │ │ │ ├── ajax │ │ │ ├── GetUserAccountFailedLoginTest.php │ │ │ ├── GetUserAccountSuccessTest.php │ │ │ ├── GetUserOrderFailLoginTest.php │ │ │ └── GetUserOrderSuccessTest.php │ │ │ └── route │ │ │ ├── index │ │ │ ├── UserViewsAccountNotLoggedInTest.php │ │ │ └── UserViewsAccountSuccessTest.php │ │ │ └── show │ │ │ ├── ShowUserOrderDoesNotExistTest.php │ │ │ ├── ShowUserOrderNotLoggedInTest.php │ │ │ ├── ShowUserOrderSuccessTest.php │ │ │ └── ShowUserOrderWrongUserTest.php │ ├── integration │ │ ├── db │ │ │ ├── classes │ │ │ │ ├── ImageDatabaseClassTest.php │ │ │ │ └── ProductDatabaseClassTest.php │ │ │ ├── models │ │ │ │ ├── AddressModelTest.php │ │ │ │ ├── OrderModelTest.php │ │ │ │ ├── ProductModelTest.php │ │ │ │ └── UserModelTest.php │ │ │ ├── orders │ │ │ │ └── OrderDatabaseClassTest.php │ │ │ └── transformers │ │ │ │ ├── AbstractTestOrderTransformer.php │ │ │ │ ├── AddressTransformerTest.php │ │ │ │ ├── OrderTransformerAddressTest.php │ │ │ │ ├── OrderTransformerBasicTest.php │ │ │ │ ├── OrderTransformerProductsTest.php │ │ │ │ ├── OrderTransformerUserTest.php │ │ │ │ ├── ProductTransformerTest.php │ │ │ │ ├── ShoppingCartTransformerTest.php │ │ │ │ ├── UserAccountTransformerTest.php │ │ │ │ └── UserTransformerTest.php │ │ └── shoppingcart │ │ │ ├── AbstractShoppingCart.php │ │ │ ├── AddToShoppingCartTest.php │ │ │ ├── RemoveItemShoppingCartTest.php │ │ │ └── UpdateShoppingCartTest.php │ └── unit │ │ ├── ErrorTracker │ │ ├── AbstractTestsErrorTracker.php │ │ ├── AddressErrorTrackerTest.php │ │ └── OrderErrorTrackerTest.php │ │ └── classes │ │ ├── ApiResponseTrackerTest.php │ │ ├── DateFormatTest.php │ │ ├── SalesDateFormatTest.php │ │ └── ShipDateEstimatorTest.php ├── ShoppingCartProviderTest.php ├── TestCase.php ├── Traits │ ├── Payment │ │ └── StripePaymentTrait.php │ ├── SetUpAddressTrait.php │ ├── SetUpCategoryTrait.php │ ├── SetUpImageTrait.php │ ├── SetUpOrderTrait.php │ ├── SetUpProductsTrait.php │ ├── SetUpSaleTrait.php │ ├── SetUpShoppingCartTrait.php │ ├── SetUpTaxTrait.php │ └── SetUpUserTrait.php └── shopping_cart_tests_helpers │ ├── NamespacedProductModelStub.php │ ├── ProductModelStub.php │ └── SessionMock.php ├── webpack.mix.js └── yarn.lock /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/.DS_Store -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/storage 3 | /public/hot 4 | /storage/*.key 5 | /vendor 6 | /.idea 7 | Homestead.json 8 | Homestead.yaml 9 | .env 10 | .env.testing 11 | .env.dusk.local -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Shawn DL 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: vendor/bin/heroku-php-apache2 public -------------------------------------------------------------------------------- /after.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # If you would like to do some extra provisioning you may 4 | # add any commands you wish to this file and they will 5 | # be run after the Homestead machine is provisioned. 6 | -------------------------------------------------------------------------------- /app/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/app/.DS_Store -------------------------------------------------------------------------------- /app/Address.php: -------------------------------------------------------------------------------- 1 | where('id', $id) 29 | ->with('state') 30 | ->first(); 31 | } 32 | 33 | /** 34 | * An address will have one state 35 | * 36 | * @return BelongsTo 37 | */ 38 | public function state() 39 | { 40 | return $this->belongsTo('App\State'); 41 | } 42 | 43 | /** 44 | * did the query return a result 45 | * 46 | * @return bool 47 | */ 48 | public function hasResult() 49 | { 50 | return (isset($this->id)); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/Category.php: -------------------------------------------------------------------------------- 1 | hasMany('App\Product'); 28 | } 29 | 30 | public function setNameAttribute($value) 31 | { 32 | $this->attributes['name'] = ucwords($value); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire') 30 | // ->hourly(); 31 | } 32 | 33 | /** 34 | * Register the Closure based commands for the application. 35 | * 36 | * @return void 37 | */ 38 | protected function commands() 39 | { 40 | require base_path('routes/console.php'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/Http/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/app/Http/.DS_Store -------------------------------------------------------------------------------- /app/Http/Controllers/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/app/Http/Controllers/.DS_Store -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/app/Http/Controllers/Admin/.DS_Store -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/API/ProductsAPIController.php: -------------------------------------------------------------------------------- 1 | products = $products; 25 | } 26 | 27 | /** 28 | * gets a paginated products array 29 | * 30 | * @return \Illuminate\Http\JsonResponse 31 | */ 32 | public function index() 33 | { 34 | $paginate = $this->products 35 | ->with('category') 36 | ->with('image') 37 | ->with(['sales' => function($query){ 38 | return $query->current(); 39 | }]) 40 | ->paginate(10); 41 | 42 | return response()->json([ 43 | 'products' => $paginate 44 | ], 200); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/AbstractAdminController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 16 | $this->middleware('auth.admin'); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/AdminHomeController.php: -------------------------------------------------------------------------------- 1 | categories = $categories; 23 | parent::__construct(); 24 | 25 | } 26 | 27 | 28 | /** 29 | * Display all the categories details 30 | * 31 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View 32 | */ 33 | public function index() 34 | { 35 | return view('admin.index', [ 36 | 'table' => 'admin._includes._tables._categories' 37 | ]); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/StatesController.php: -------------------------------------------------------------------------------- 1 | 'admin._includes._tables._states' 17 | ]); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/TaxesController.php: -------------------------------------------------------------------------------- 1 | 'admin._includes._tables._taxes' 19 | ]); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ForgotPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | middleware('guest', ['except' => 'logout']); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | validate($request, [ 21 | 'search' => 'required|basic_characters' 22 | ]); 23 | $products = $product->search($request->search)->get(); 24 | 25 | return response()->json([ 26 | 'products' => ProductsTransformer::transform($products), 27 | 'search' => $request->search], 28 | 200); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Controllers/User/API/StateController.php: -------------------------------------------------------------------------------- 1 | pluck('name', 'id')->toArray(); 20 | } catch (\Exception $exception) { 21 | return $this->hasError('Sorry there was an issue processing your request', 422); 22 | } 23 | 24 | return response()->json([ 25 | 'states' => $states 26 | ], 200); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Controllers/User/API/UserController.php: -------------------------------------------------------------------------------- 1 | middleware('ajax.auth'); 17 | } 18 | 19 | /** 20 | * returns the users information if logged in 21 | * 22 | * @return \Illuminate\Http\JsonResponse 23 | */ 24 | public function index() 25 | { 26 | try { 27 | $user = UserTransformer::single(Auth::user()); 28 | } catch (\Exception $exception) { 29 | return $this->processingError(); 30 | } 31 | return response()->json([ 32 | 'user' => $user 33 | ], 200); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/Http/Controllers/User/ProductsController.php: -------------------------------------------------------------------------------- 1 | where('title', $title) 20 | ->with('image', 'category', 'tax') 21 | ->with(['reviews' => function($query){ 22 | $query->with('user')->latest()->limit(4); 23 | } ])->first(); 24 | 25 | return view('ecommerce.show', [ 26 | 'product' => $query 27 | ]); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/Http/Controllers/User/UserPagesController.php: -------------------------------------------------------------------------------- 1 | allowed)) 31 | { 32 | return $this->onSuccess(); 33 | } 34 | return redirect($this->redirect); 35 | } 36 | 37 | /** 38 | * @param $error 39 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector 40 | */ 41 | protected function hasError($error) 42 | { 43 | session()->flash('error', $error); 44 | return redirect($this->redirect); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/Http/Middleware/AjaxRequestMiddleware.php: -------------------------------------------------------------------------------- 1 | json([ 22 | 'error' => 'You are not authorized to perform this request!' 23 | ], 401); 24 | } 25 | 26 | return $next($request); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | check()) { 21 | return redirect('/'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfNotAdmin.php: -------------------------------------------------------------------------------- 1 | user()->hasRole('admin')) 19 | { 20 | if($request->ajax()) { 21 | return response('Unauthorized', 401); 22 | } 23 | return redirect('/'); 24 | 25 | } 26 | 27 | return $next($request); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfRole.php: -------------------------------------------------------------------------------- 1 | user()->hasNoRole()) 19 | { 20 | return redirect('/'); 21 | } 22 | return $next($request); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | hasRole('admin')); 18 | } 19 | 20 | /** 21 | * Get the validation rules that apply to the request. 22 | * 23 | * @return array 24 | */ 25 | public function rules() 26 | { 27 | return [ 28 | 'name' => 'required|alpha_spaces' 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Http/Requests/ProductFormRequest.php: -------------------------------------------------------------------------------- 1 | 'required|alpha_spaces', 28 | 'category' => 'required|numeric', 29 | 'description' => 'required|basic_characters', 30 | 'price' => 'required|regex:/^(\d{1,8})\.(\d{2})$/', 31 | 'weight' => 'required|regex:/^\d*\.?\d*$/', 32 | 'image' => 'required_without:upload|url', 33 | 'upload' => 'required_without:image|image', 34 | 'thumbnail' => 'url' 35 | ]; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/Http/Requests/RegisterUserRequest.php: -------------------------------------------------------------------------------- 1 | 'required|unique:users|alpha_dash', 28 | 'first_name' => 'required|alpha', 29 | 'last_name' => 'required|alpha', 30 | 'email' => 'required|unique:users|email', 31 | 'password' => 'required|min:6|confirmed', 32 | 'password_confirmation' => 'required' 33 | ]; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/Http/Requests/SalesFormRequest.php: -------------------------------------------------------------------------------- 1 | 'required|numeric', 29 | 'start' => 'required|date|before:finish', 30 | 'finish' => 'required|date|after:start', 31 | 'discount' => 'required|regex:/^0(\.\d{1,2})$/' 32 | ]; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/Http/Requests/ShipOrderRequest.php: -------------------------------------------------------------------------------- 1 | 'required|date', 28 | 'arrival' => 'required|date|after:ship' 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Http/Requests/StatesFormRequest.php: -------------------------------------------------------------------------------- 1 | hasRole('admin')); 18 | } 19 | 20 | /** 21 | * Get the validation rules that apply to the request. 22 | * 23 | * @return array 24 | */ 25 | public function rules() 26 | { 27 | return [ 28 | 'name' => 'required|alpha_spaces', 29 | 'abbreviation' => 'required|alpha' 30 | ]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Requests/TaxFormRequest.php: -------------------------------------------------------------------------------- 1 | hasRole('admin')); 18 | } 19 | 20 | /** 21 | * Get the validation rules that apply to the request. 22 | * 23 | * @return array 24 | */ 25 | public function rules() 26 | { 27 | return [ 28 | 'name' => 'required|alpha_spaces', 29 | 'description' => 'required|basic_characters', 30 | 'percent' => 'required|regex:/^\d*\.?\d*$/', 31 | ]; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Http/Requests/UserOrderRequest.php: -------------------------------------------------------------------------------- 1 | "required|numeric", 51 | ]; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /app/Image.php: -------------------------------------------------------------------------------- 1 | action('Admin\ProductsController@index'), 20 | 'product_api_url' => action('Admin\API\ProductsAPIController@index'), 21 | 'tax_url' => action('Admin\TaxesController@index'), 22 | 'tax_api_url' => action('Admin\API\TaxesAPIController@index'), 23 | 'sale_url' => action('Admin\SalesController@index'), 24 | 'order_url' => action('Admin\API\OrdersAPIController@show', ['order' => null]), 25 | 'category_url' => action('Admin\CategoriesController@index'), 26 | 'category_api_url' => action('Admin\API\CategoriesAPIController@index'), 27 | 'state_api_url' => action('Admin\API\StatesAPIController@index') 28 | ]; 29 | } 30 | } -------------------------------------------------------------------------------- /app/Library/Data/FetchJsonFile.php: -------------------------------------------------------------------------------- 1 | store($previous, 'public'); 33 | return $image->create([ 34 | 'path' => url($imagePath), 35 | 'thumbnail' => url($thumbnail) 36 | ]); 37 | } 38 | } -------------------------------------------------------------------------------- /app/Library/Files/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/app/Library/Files/.DS_Store -------------------------------------------------------------------------------- /app/Library/Files/Names/ThumbnailFileNames.php: -------------------------------------------------------------------------------- 1 | extension(); 40 | $hash = $file->hashName(); 41 | return substr_replace($hash, '_tn.' . $ext, strrpos($hash, '.')); 42 | } 43 | } -------------------------------------------------------------------------------- /app/Library/Files/Resize/ImageDimensions.php: -------------------------------------------------------------------------------- 1 | format('Y-m-d'); 25 | } 26 | } -------------------------------------------------------------------------------- /app/Library/Order/ShippingDateEstimator.php: -------------------------------------------------------------------------------- 1 | add(new \DateInterval(self::formatTimeInterval($numberOfDays))); 27 | return $date->format('M jS, Y'); 28 | } 29 | 30 | /** 31 | * creates a datetime interval format based on the number of days 32 | * 33 | * @param $numberOfDays 34 | * @return string 35 | */ 36 | private static function formatTimeInterval($numberOfDays) 37 | { 38 | return 'P' . $numberOfDays . 'D'; 39 | } 40 | } -------------------------------------------------------------------------------- /app/Library/ShoppingCart/ShoppingCartInterface.php: -------------------------------------------------------------------------------- 1 | findItem($this->product->id); 24 | $this->cart->remove($this->item->rowId); 25 | } 26 | 27 | /** 28 | * sets the result message for the user 29 | * 30 | * @return void 31 | */ 32 | protected function setResult() 33 | { 34 | $this->result = "You removed the {$this->item->name} from your shopping cart"; 35 | } 36 | } -------------------------------------------------------------------------------- /app/Library/ShoppingCart/ShoppingCartUpdate.php: -------------------------------------------------------------------------------- 1 | findItem($this->product->id); 23 | $this->cart->setQuantity($this->item->rowId, $this->quantity); 24 | } 25 | 26 | /** 27 | * sets the result message for the user 28 | * 29 | * @return void 30 | */ 31 | protected function setResult() 32 | { 33 | $this->result = "You have updated the quantity of {$this->product->title} to {$this->quantity}"; 34 | } 35 | } -------------------------------------------------------------------------------- /app/Library/Transformer/AddressTransformer.php: -------------------------------------------------------------------------------- 1 | $address->id, 30 | 'street_address' => $address->address, 31 | 'city' => $address->city, 32 | 'state' => $address->state->name, 33 | 'state_id' => $address->state_id, 34 | 'postal_code' => $address->postal_code 35 | ]; 36 | } 37 | } -------------------------------------------------------------------------------- /app/Library/Transformer/ProductsTransformer.php: -------------------------------------------------------------------------------- 1 | $model->id, 33 | 'title' => $model->title, 34 | 'price' => $model->price, 35 | 'description' => $model->description, 36 | 'weight' => $model->weight, 37 | 'category' => $model->category()->first()->name, 38 | 'image' => $model->image()->first()->path, 39 | 'thumbnail' => $model->image()->first()->thumbnail 40 | ]; 41 | } 42 | } -------------------------------------------------------------------------------- /app/Library/Transformer/UserAccountTransformer.php: -------------------------------------------------------------------------------- 1 | UserTransformer::single($user), 33 | 'addresses' => AddressTransformer::transform($user->addresses), 34 | 'orders' => OrderTransformers::transform($user->orders) 35 | ]; 36 | } 37 | } -------------------------------------------------------------------------------- /app/Library/Transformer/UserTransformer.php: -------------------------------------------------------------------------------- 1 | $model->id, 28 | 'first_name' => $model->first_name, 29 | 'last_name' => $model->last_name, 30 | 'email' => $model->email, 31 | 'username' => $model->username 32 | ]; 33 | } 34 | } -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | app->environment('local', 'testing')) { 28 | $this->app->register(DuskServiceProvider::class); 29 | } 30 | if($this->app->isLocal()) 31 | { 32 | $this->app->register(\Barryvdh\Debugbar\ServiceProvider::class); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/Providers/AuthServiceProvider.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/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'App\Listeners\EventListener', 18 | ], 19 | ]; 20 | 21 | /** 22 | * Register any events for your application. 23 | * 24 | * @return void 25 | */ 26 | public function boot() 27 | { 28 | parent::boot(); 29 | 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Providers/SideBarServiceProvider.php: -------------------------------------------------------------------------------- 1 | with('categories', $categories); 20 | }); 21 | 22 | View::composer('_includes._ecommerce._navbar', function($view){ 23 | $categories = \App\Category::pluck('name'); 24 | $view->with('categories', $categories); 25 | }); 26 | } 27 | 28 | /** 29 | * Register the application services. 30 | * 31 | * @return void 32 | */ 33 | public function register() 34 | { 35 | // 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/Providers/ValidationServiceProvider.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\User'); 26 | } 27 | 28 | /** 29 | * a review has one product 30 | * 31 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo 32 | */ 33 | public function product() 34 | { 35 | return $this->belongsTo('App\Product'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/Role.php: -------------------------------------------------------------------------------- 1 | where('start', '<=', Carbon::now()) 26 | ->where('finish', '>=', Carbon::now()->format('Y-m-d')); 27 | } 28 | 29 | 30 | /** 31 | * a sale has a single product 32 | * 33 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo 34 | */ 35 | public function product() 36 | { 37 | return $this->belongsTo('App\Product'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/State.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | ], 21 | 22 | 'ses' => [ 23 | 'key' => env('SES_KEY'), 24 | 'secret' => env('SES_SECRET'), 25 | 'region' => 'us-east-1', 26 | ], 27 | 28 | 'sparkpost' => [ 29 | 'secret' => env('SPARKPOST_SECRET'), 30 | ], 31 | 32 | 'stripe' => [ 33 | 'model' => App\User::class, 34 | 'key' => env('STRIPE_KEY'), 35 | 'secret' => env('STRIPE_SECRET'), 36 | ], 37 | 38 | ]; 39 | -------------------------------------------------------------------------------- /config/shoppingCart.php: -------------------------------------------------------------------------------- 1 | env('TAX_PRODUCT_PRICES', 1), 16 | 'taxShippingPrices' => env('TAX_SHIPPING_PRICES', 1), 17 | 18 | // Display prices 19 | 'taxProductDisplayPrices' => env('TAX_PRODUCT_DISPLAY_PRICES', 1), 20 | 'taxShippingDisplayPrices' => env('TAX_SHIPPING_DISPLAY_PRICES', 1), 21 | ]; -------------------------------------------------------------------------------- /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' => realpath(storage_path('framework/views')), 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /database/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/database/.DS_Store -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('username')->unique(); 19 | $table->string('email')->unique(); 20 | $table->string('password'); 21 | $table->string('first_name'); 22 | $table->string('last_name'); 23 | $table->string('phone')->nullable(); 24 | $table->rememberToken(); 25 | $table->timestamps(); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('users'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /database/migrations/2017_03_23_065358_create_catagories_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name')->unique(); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('categories'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2017_03_23_065633_create_roles_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name')->unique(); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('roles'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2017_03_23_074747_role_user.php: -------------------------------------------------------------------------------- 1 | integer('role_id')->unsigned()->index(); 18 | $table->foreign('role_id')->references('id')->on('roles')->onDelete('cascade'); 19 | $table->integer('user_id')->unsigned()->index(); 20 | $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::table('role_user', function(Blueprint $table) { 32 | $table->dropForeign('role_user_role_id_foreign'); 33 | $table->dropForeign('role_user_user_id_foreign'); 34 | }); 35 | Schema::dropIfExists('role_user'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2017_05_18_120354_create_images_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('path'); 19 | $table->string('thumbnail')->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('images'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2017_06_15_000704_create_states_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name')->unique(); 19 | $table->string('abbreviation'); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('states'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2017_06_21_110618_create_taxes_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | $table->float('percent'); 20 | $table->longText('description'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::dropIfExists('taxes'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2017_07_19_043413_create_sales_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('product_id')->unsigned(); 19 | $table->date('start'); 20 | $table->date('finish'); 21 | $table->decimal('discount'); 22 | $table->timestamps(); 23 | 24 | $table->foreign('product_id') 25 | ->references('id') 26 | ->on('products') 27 | ->onDelete('cascade'); 28 | }); 29 | } 30 | 31 | /** 32 | * Reverse the migrations. 33 | * 34 | * @return void 35 | */ 36 | public function down() 37 | { 38 | Schema::dropIfExists('sales'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /database/seeds/AddressTableSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /database/seeds/CategoryTableSeeder.php: -------------------------------------------------------------------------------- 1 | categories as $category) 24 | { 25 | \App\Category::create([ 26 | 'name' => $category 27 | ]); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UserTableSeeder::class); 15 | $this->call(RoleTableSeeder::class); 16 | $this->call(CategoryTableSeeder::class); 17 | //$this->call(SeedImageTable::class); 18 | $this->call(TaxTableSeeder::class); 19 | $this->call(ProductTableSeeder::class); 20 | $this->call(ReviewTableSeeder::class); 21 | $this->call(StateTableSeeder::class); 22 | // $this->call(AddressTableSeeder::class); 23 | // $this->call(OrderTableSeeder::class); 24 | // $this->call(SaleTableSeeder::class); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /database/seeds/OrderTableSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /database/seeds/ReviewTableSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 15 | $reviews = \App\Library\Data\FetchJsonFile::open('reviews.json'); 16 | 17 | foreach ($reviews as $review) 18 | { 19 | $product = \App\Product::inRandomOrder()->first(); 20 | $user = \App\User::inRandomOrder()->first(); 21 | \App\Review::create([ 22 | 'product_id' => $product->id, 23 | 'user_id' => $user->id, 24 | 'stars' => $review['stars'], 25 | 'review' => $review['review'] 26 | ]); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /database/seeds/RoleTableSeeder.php: -------------------------------------------------------------------------------- 1 | 'admin' 17 | ]); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /database/seeds/SaleTableSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /database/seeds/SeedImageTable.php: -------------------------------------------------------------------------------- 1 | create(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /database/seeds/TaxTableSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 15 | $taxes = \App\Library\Data\FetchJsonFile::open('taxes.json'); 16 | foreach ($taxes as $tax) 17 | { 18 | \App\Tax::create([ 19 | 'name' => $tax['name'], 20 | 'description' => $tax['description'], 21 | 'percent' => $tax['percent'] 22 | ]); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /database/seeds/UserTableSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 15 | $users = \App\Library\Data\FetchJsonFile::open('users.json'); 16 | foreach ($users as $user) 17 | { 18 | \App\User::create([ 19 | 'username' => $user['first_name'] . $user['last_name'], 20 | 'first_name' => $user['first_name'], 21 | 'last_name' => $user['last_name'], 22 | 'phone' => $user['phone'], 23 | 'email' => $user['email'], 24 | 'password' => bcrypt($user['password']) 25 | ]); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /demo/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/demo/.DS_Store -------------------------------------------------------------------------------- /demo/laracommer-home_tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/demo/laracommer-home_tn.png -------------------------------------------------------------------------------- /demo/laracommerce-show-item_tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/demo/laracommerce-show-item_tn.png -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | const elixir = require('laravel-elixir'); 2 | 3 | require('laravel-elixir-vue-2'); 4 | 5 | /* 6 | |-------------------------------------------------------------------------- 7 | | Elixir Asset Management 8 | |-------------------------------------------------------------------------- 9 | | 10 | | Elixir provides a clean, fluent API for defining some basic Gulp tasks 11 | | for your Laravel application. By default, we are compiling the Sass 12 | | file for your application as well as publishing vendor resources. 13 | | 14 | */ 15 | 16 | elixir(function (mix) { 17 | mix.sass('app.scss'); 18 | 19 | mix.scripts([ 20 | '../../../node_modules/vue/dist/vue.js', 21 | '../../../node_modules/jquery/dist/jquery.js', 22 | '../../../node_modules/bootstrap-sass/assets/javascripts/bootstrap.js', 23 | '../../../node_modules/axios/dist/axios.js', 24 | 'components', 25 | 'app.js' 26 | ], 'public/js/app.js'); 27 | 28 | mix.copy('node_modules/bootstrap-sass/assets/fonts', 'public/fonts/bootstrap') 29 | mix.copy('node_modules/font-awesome/fonts', 'public/fonts') 30 | }); 31 | 32 | -------------------------------------------------------------------------------- /phpunit.dusk.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests/Browser 14 | 15 | 16 | 17 | 18 | ./app 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests/Feature 14 | 15 | 16 | 17 | ./tests/Unit 18 | 19 | 20 | 21 | 22 | ./app 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /public/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/.DS_Store -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Redirect Trailing Slashes If Not A Folder... 9 | RewriteCond %{REQUEST_FILENAME} !-d 10 | RewriteRule ^(.*)/$ /$1 [L,R=301] 11 | 12 | # Handle Front Controller... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_FILENAME} !-f 15 | RewriteRule ^ index.php [L] 16 | 17 | # Handle Authorization Header 18 | RewriteCond %{HTTP:Authorization} . 19 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 20 | 21 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/favicon.ico -------------------------------------------------------------------------------- /public/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /public/fonts/bootstrap/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/fonts/bootstrap/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/fonts/bootstrap/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/fonts/bootstrap/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/fonts/bootstrap/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/fonts/bootstrap/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/fonts/bootstrap/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/fonts/bootstrap/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /public/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /public/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /public/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /public/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /public/fonts/vendor/font-awesome/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/fonts/vendor/font-awesome/fontawesome-webfont.eot -------------------------------------------------------------------------------- /public/fonts/vendor/font-awesome/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/fonts/vendor/font-awesome/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /public/fonts/vendor/font-awesome/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/fonts/vendor/font-awesome/fontawesome-webfont.woff -------------------------------------------------------------------------------- /public/fonts/vendor/font-awesome/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/fonts/vendor/font-awesome/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /public/images/headerimage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/headerimage.jpg -------------------------------------------------------------------------------- /public/images/headerimage2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/headerimage2.jpg -------------------------------------------------------------------------------- /public/images/headerimagescale.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/headerimagescale.jpg -------------------------------------------------------------------------------- /public/images/headerimagescale2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/headerimagescale2.jpg -------------------------------------------------------------------------------- /public/images/products/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/.DS_Store -------------------------------------------------------------------------------- /public/images/products/accessory-analog-classic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/accessory-analog-classic.jpg -------------------------------------------------------------------------------- /public/images/products/accessory-analog-classic_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/accessory-analog-classic_tn.jpg -------------------------------------------------------------------------------- /public/images/products/accessory-classic-close-up.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/accessory-classic-close-up.jpg -------------------------------------------------------------------------------- /public/images/products/accessory-classic-close-up_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/accessory-classic-close-up_tn.jpg -------------------------------------------------------------------------------- /public/images/products/analog-watch-black-and-white-reflection.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/analog-watch-black-and-white-reflection.jpg -------------------------------------------------------------------------------- /public/images/products/analog-watch-black-and-white-reflection_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/analog-watch-black-and-white-reflection_tn.jpg -------------------------------------------------------------------------------- /public/images/products/analogue-color-executive.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/analogue-color-executive.jpg -------------------------------------------------------------------------------- /public/images/products/analogue-color-executive_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/analogue-color-executive_tn.jpg -------------------------------------------------------------------------------- /public/images/products/background-bright-close-up.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/background-bright-close-up.jpg -------------------------------------------------------------------------------- /public/images/products/background-bright-close-up_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/background-bright-close-up_tn.jpg -------------------------------------------------------------------------------- /public/images/products/black-and-white-coach-design.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/black-and-white-coach-design.jpg -------------------------------------------------------------------------------- /public/images/products/black-and-white-coach-design_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/black-and-white-coach-design_tn.jpg -------------------------------------------------------------------------------- /public/images/products/black-camera-dslr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/black-camera-dslr.jpg -------------------------------------------------------------------------------- /public/images/products/black-camera-dslr_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/black-camera-dslr_tn.jpg -------------------------------------------------------------------------------- /public/images/products/black-classic-clothes.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/black-classic-clothes.jpg -------------------------------------------------------------------------------- /public/images/products/black-classic-clothes_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/black-classic-clothes_tn.jpg -------------------------------------------------------------------------------- /public/images/products/blur-blurred-background-bottle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/blur-blurred-background-bottle.jpg -------------------------------------------------------------------------------- /public/images/products/blur-blurred-background-bottle_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/blur-blurred-background-bottle_tn.jpg -------------------------------------------------------------------------------- /public/images/products/blur-brush-close-up.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/blur-brush-close-up.jpg -------------------------------------------------------------------------------- /public/images/products/blur-brush-close-up_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/blur-brush-close-up_tn.jpg -------------------------------------------------------------------------------- /public/images/products/blur-business-close-up.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/blur-business-close-up.jpg -------------------------------------------------------------------------------- /public/images/products/blur-business-close-up_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/blur-business-close-up_tn.jpg -------------------------------------------------------------------------------- /public/images/products/blurred-background-book-shelves-books.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/blurred-background-book-shelves-books.jpg -------------------------------------------------------------------------------- /public/images/products/blurred-background-book-shelves-books_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/blurred-background-book-shelves-books_tn.jpg -------------------------------------------------------------------------------- /public/images/products/bottle-container-glass.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/bottle-container-glass.jpg -------------------------------------------------------------------------------- /public/images/products/bottle-container-glass_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/bottle-container-glass_tn.jpg -------------------------------------------------------------------------------- /public/images/products/camera-digicam-digital-camera.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/camera-digicam-digital-camera.jpg -------------------------------------------------------------------------------- /public/images/products/camera-digicam-digital-camera_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/camera-digicam-digital-camera_tn.jpg -------------------------------------------------------------------------------- /public/images/products/camera-dslr-electronics.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/camera-dslr-electronics.jpg -------------------------------------------------------------------------------- /public/images/products/camera-dslr-electronics_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/camera-dslr-electronics_tn.jpg -------------------------------------------------------------------------------- /public/images/products/fashion-footwear-shoes.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/fashion-footwear-shoes.jpg -------------------------------------------------------------------------------- /public/images/products/fashion-footwear-shoes_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/fashion-footwear-shoes_tn.jpg -------------------------------------------------------------------------------- /public/images/products/footwear-shoe-sneakers.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/footwear-shoe-sneakers.jpg -------------------------------------------------------------------------------- /public/images/products/footwear-shoe-sneakers_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/public/images/products/footwear-shoe-sneakers_tn.jpg -------------------------------------------------------------------------------- /public/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/app.js": "/js/app.5c927d40219b12677d46.js", 3 | "/css/app.css": "/css/app.54d01adaaf05df18dcc89715b9e08e91.css", 4 | "/css/admin.css": "/css/admin.c09e659f86992aae2bfc3dc5ded23303.css", 5 | "/js/admin.js": "/js/admin.26ba64c1595e5bf3fa4c.js" 6 | } -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /resources/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/resources/.DS_Store -------------------------------------------------------------------------------- /resources/assets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/resources/assets/.DS_Store -------------------------------------------------------------------------------- /resources/assets/js/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/resources/assets/js/.DS_Store -------------------------------------------------------------------------------- /resources/assets/js/components/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/resources/assets/js/components/.DS_Store -------------------------------------------------------------------------------- /resources/assets/js/components/account/address-box.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | -------------------------------------------------------------------------------- /resources/assets/js/components/account/user-account-address.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | -------------------------------------------------------------------------------- /resources/assets/js/components/admin/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/resources/assets/js/components/admin/.DS_Store -------------------------------------------------------------------------------- /resources/assets/js/components/admin/categories/category-row.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | -------------------------------------------------------------------------------- /resources/assets/js/components/admin/categories/edit-category-button.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | -------------------------------------------------------------------------------- /resources/assets/js/components/admin/taxes/tax-row.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | -------------------------------------------------------------------------------- /resources/assets/js/components/functionality/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/resources/assets/js/components/functionality/.DS_Store -------------------------------------------------------------------------------- /resources/assets/js/components/functionality/animations/fade-out-animation.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /resources/assets/js/components/functionality/animations/slide-in-animation.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /resources/assets/js/components/functionality/messages/error-message.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 18 | 19 | -------------------------------------------------------------------------------- /resources/assets/js/components/functionality/messages/success-message.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 18 | 19 | 22 | -------------------------------------------------------------------------------- /resources/assets/js/components/functionality/modal/message-modal.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 32 | -------------------------------------------------------------------------------- /resources/assets/js/components/functionality/screen/full-screen.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 23 | 24 | -------------------------------------------------------------------------------- /resources/assets/js/components/functionality/select-cart-quantity.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | -------------------------------------------------------------------------------- /resources/assets/js/components/functionality/view-message.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /resources/assets/js/components/navbar/categories-navbar.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | -------------------------------------------------------------------------------- /resources/assets/js/components/navbar/search-products.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 24 | -------------------------------------------------------------------------------- /resources/assets/js/components/order/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/resources/assets/js/components/order/.DS_Store -------------------------------------------------------------------------------- /resources/assets/js/components/order/confirm-cart/order-information.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | -------------------------------------------------------------------------------- /resources/assets/js/components/order/payment/order-payment.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | -------------------------------------------------------------------------------- /resources/assets/js/components/order/shared/order-total-details.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | -------------------------------------------------------------------------------- /resources/assets/js/components/shared-information/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/resources/assets/js/components/shared-information/.DS_Store -------------------------------------------------------------------------------- /resources/assets/js/components/shared-information/address/shipping-address.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /resources/assets/js/components/shared-information/user-details.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | -------------------------------------------------------------------------------- /resources/assets/js/components/shopping-cart/add-cart-icon.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /resources/assets/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | 2 | // Body 3 | $body-bg: #f5f8fa; 4 | 5 | // Borders 6 | $laravel-border-color: darken($body-bg, 10%); 7 | $list-group-border: $laravel-border-color; 8 | $navbar-default-border: $laravel-border-color; 9 | $panel-default-border: $laravel-border-color; 10 | $panel-inner-border: $laravel-border-color; 11 | 12 | // Brands 13 | $brand-primary: #3097D1; 14 | $brand-info: #8eb4cb; 15 | $brand-success: #2ab27b; 16 | $brand-warning: #cbb956; 17 | $brand-danger: #bf5329; 18 | 19 | // Typography 20 | $icon-font-path: "~bootstrap-sass/assets/fonts/bootstrap/"; 21 | $font-family-sans-serif: "Raleway", sans-serif; 22 | $font-size-base: 14px; 23 | $line-height-base: 1.6; 24 | $text-color: #636b6f; 25 | 26 | // Navbar 27 | $navbar-default-bg: #fff; 28 | 29 | // Buttons 30 | $btn-default-color: $text-color; 31 | 32 | // Inputs 33 | $input-border: lighten($text-color, 40%); 34 | $input-border-focus: lighten($brand-primary, 25%); 35 | $input-color-placeholder: lighten($text-color, 30%); 36 | 37 | // Panels 38 | $panel-default-heading-bg: #fff; 39 | 40 | // Path 41 | $icon-font-path: "~/node_modules/bootstrap-sass/assets/fonts/bootstrap/" !default; -------------------------------------------------------------------------------- /resources/assets/sass/admin.scss: -------------------------------------------------------------------------------- 1 | // Fonts 2 | @import "../../../node_modules/font-awesome/scss/font-awesome"; 3 | 4 | // Bootstrap 5 | @import "../../../node_modules/bootstrap-sass/assets/stylesheets/bootstrap"; 6 | 7 | // Gentelella Template 8 | @import "admin/custom"; 9 | @import "admin/panels"; 10 | @import "admin/tables"; 11 | 12 | // Shared 13 | @import "shared/message"; 14 | 15 | // Custom Sass 16 | @import "ecommerce/general"; 17 | @import "ecommerce/modal"; 18 | @import "ecommerce/products"; 19 | @import "ecommerce/order"; 20 | -------------------------------------------------------------------------------- /resources/assets/sass/admin/_panels.scss: -------------------------------------------------------------------------------- 1 | .panel-categories { 2 | min-height: 170px; 3 | } -------------------------------------------------------------------------------- /resources/assets/sass/admin/_tables.scss: -------------------------------------------------------------------------------- 1 | .table-element { 2 | font-weight: bold; 3 | } -------------------------------------------------------------------------------- /resources/assets/sass/app.scss: -------------------------------------------------------------------------------- 1 | 2 | // Fonts 3 | @import "../../../node_modules/font-awesome/scss/font-awesome"; 4 | 5 | // Variables 6 | @import "variables"; 7 | 8 | // Bootstrap 9 | @import "../../../node_modules/bootstrap-sass/assets/stylesheets/bootstrap"; 10 | 11 | /// Import main page layout 12 | @import "ecommerce/general"; 13 | @import "ecommerce/layout"; 14 | @import "ecommerce/forms"; 15 | @import "ecommerce/order"; 16 | @import "ecommerce/modal"; 17 | @import "ecommerce/navbar"; 18 | @import "ecommerce/payment"; 19 | @import "ecommerce/products"; 20 | @import "ecommerce/search"; 21 | 22 | // Shared 23 | @import "shared/message"; -------------------------------------------------------------------------------- /resources/assets/sass/ecommerce/_forms.scss: -------------------------------------------------------------------------------- 1 | .user-form { 2 | display: block; 3 | margin-bottom: 185px; 4 | margin-top: 185px; 5 | overflow: hidden; 6 | } 7 | 8 | .shopping-cart-form { 9 | padding: 2px; 10 | margin: 2px; 11 | border: none; 12 | cursor: pointer; 13 | display: block; 14 | text-align: center; 15 | } -------------------------------------------------------------------------------- /resources/assets/sass/ecommerce/_navbar.scss: -------------------------------------------------------------------------------- 1 | .shopping-cart-drop { 2 | border: 1px solid #000; 3 | position: absolute; 4 | width: 400px; 5 | background-color: beige; 6 | border-radius: 10px; 7 | list-style: none; 8 | padding: 5px; 9 | right: -110px; 10 | } 11 | 12 | .dropdown-button{ 13 | margin: 5px; 14 | } 15 | 16 | .dropdown-title { 17 | font-size: 1.3em; 18 | text-align: center; 19 | padding: 10px; 20 | font-weight: bold; 21 | border-bottom: 1px solid #000; 22 | } 23 | 24 | .dropdown-item { 25 | padding: 10px; 26 | display: flex; 27 | } 28 | 29 | .dropdown-item-info p { 30 | margin: 0; 31 | padding: 0; 32 | } 33 | 34 | .dropdown-item-image { 35 | loat: left; 36 | height: 50px; 37 | width: auto; 38 | padding: 0 10px 0 4px; 39 | } 40 | 41 | .dropdown-quantity { 42 | position: absolute; 43 | right: 45px; 44 | } 45 | 46 | .remove-item-icon { 47 | position: absolute; 48 | right: 10px; 49 | } 50 | 51 | .navbar-button { 52 | color: whitesmoke; 53 | background-color: #222; 54 | border: 1px solid whitesmoke; 55 | } -------------------------------------------------------------------------------- /resources/assets/sass/ecommerce/_products.scss: -------------------------------------------------------------------------------- 1 | $product-font-size: 1.1em; 2 | 3 | .product-title { 4 | color: darkslategray; 5 | font-size: $product-font-size; 6 | font-weight: bold; 7 | } 8 | 9 | .product-details { 10 | font-weight: bold; 11 | font-size: $product-font-size; 12 | color: #00aeef; 13 | } 14 | 15 | .price-cut { 16 | color: #080808; 17 | font-weight: 100; 18 | font-size: $product-font-size; 19 | text-decoration: line-through 20 | } 21 | 22 | .price-amount { 23 | color:#d58512; 24 | font-size: $product-font-size; 25 | font-weight: bold; 26 | } -------------------------------------------------------------------------------- /resources/assets/sass/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | module: { 3 | rules: [ 4 | { 5 | test: /\.scss/, 6 | use: [ 7 | { loader: 'style-loader', options: { sourceMap: false } }, 8 | { loader: 'css-loader', options: { sourceMap: false } }, 9 | { loader: 'postcss-loader', options: { sourceMap: false} }, 10 | { loader: 'sass-loader', options: { sourceMap: false } }, 11 | { loader: 'vue-loader', options: {sourceMap: false}} 12 | ] 13 | } 14 | ] 15 | } 16 | } -------------------------------------------------------------------------------- /resources/assets/sass/shared/message.scss: -------------------------------------------------------------------------------- 1 | .message-container{ 2 | position: fixed; 3 | top: 50px; 4 | z-index: 2000; 5 | width: 100%; 6 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Passwords must be at least six characters and match the confirmation.', 17 | 'reset' => 'Your password has been reset!', 18 | 'sent' => 'We have e-mailed your password reset link!', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that e-mail address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/views/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shawndl/LaraCommerce/544752038109e83986d303f9d508d93a6fad4148/resources/views/.DS_Store -------------------------------------------------------------------------------- /resources/views/_includes/_admin/_footer.blade.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/views/_includes/_admin/_navbar.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 21 |
-------------------------------------------------------------------------------- /resources/views/_includes/_ecommerce/_footer.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | 14 |
-------------------------------------------------------------------------------- /resources/views/_includes/_ecommerce/_messages.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @if(isset($errors) && count($errors) > 0) 3 |
4 | @foreach($errors->all() as $error) 5 |

{{ $error }}

6 | @endforeach 7 |
8 | @endif 9 | -------------------------------------------------------------------------------- /resources/views/_includes/_ecommerce/_sidebar.blade.php: -------------------------------------------------------------------------------- 1 |

Lara-Commerce

2 |
3 | @foreach($categories as $category) 4 | 6 | {{ $category->name }} 7 | 8 | @endforeach 9 |
-------------------------------------------------------------------------------- /resources/views/admin/_includes/_show/_order.blade.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /resources/views/admin/_includes/_tables/_categories.blade.php: -------------------------------------------------------------------------------- 1 | 4 |
5 |
6 | 7 | 8 | 9 |
10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /resources/views/admin/_includes/_tables/_orders.blade.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | @foreach($orders as $order) 16 | 17 | 20 | 23 | 26 | 29 | 32 | 33 | @endforeach 34 | 35 |
Order IDUserTotalItems OrderedView
18 | {{ $order->id }} 19 | 21 | {{ $order->user->fullName() }} 22 | 24 | {{ $order->total }} 25 | 27 | {{ $order->products->count() }} 28 | 30 | View 31 |
36 |
37 |
38 | {{ $orders->links() }} 39 |
40 |
41 | -------------------------------------------------------------------------------- /resources/views/admin/_includes/_tables/_products.blade.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /resources/views/admin/_includes/_tables/_states.blade.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /resources/views/admin/_includes/_tables/_taxes.blade.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /resources/views/admin/_includes/_tables/_usersAddresses.blade.php: -------------------------------------------------------------------------------- 1 | 5 | @if($user->addresses->count() > 0) 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | @foreach($user->addresses as $address) 17 | 18 | 19 | 20 | 21 | 22 | 23 | @endforeach 24 | 25 |
Street AddressStateCityPostal Code
{{ $address->address }}{{ $address->state->abbreviation }}{{ $address->city }}{{ $address->postal_code }}
26 | @else 27 |

There are no records for any addresses for this user

28 | @endif -------------------------------------------------------------------------------- /resources/views/admin/_includes/_tables/_usersOrders.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 6 | @if($user->orders->count() > 0) 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | @foreach($user->orders as $order) 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | @endforeach 29 | 30 |
Order IDUserTotalItems OrderedShippedView
{{ $order->id }}{{ $user->fullName() }}{{ $order->total }}{{ $order->products->count() }}{{ $order->shipped }}View Order
31 | @else 32 |

There are no records for any addresses for this user

33 | @endif -------------------------------------------------------------------------------- /resources/views/admin/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('_layout._admin') 2 | 3 | @section('content') 4 | @include($table) 5 | @endsection 6 | -------------------------------------------------------------------------------- /resources/views/admin/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('_layout._admin') 2 | 3 | @section('content') 4 | @include($show) 5 | @endsection 6 | -------------------------------------------------------------------------------- /resources/views/auth/login.blade.php: -------------------------------------------------------------------------------- 1 | @extends('_layout._ecommerce') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
9 |

Login

10 |
11 |
12 | 15 | 16 |
17 |
18 |
19 |
20 |
21 | @endsection 22 | -------------------------------------------------------------------------------- /resources/views/auth/register.blade.php: -------------------------------------------------------------------------------- 1 | @extends('_layout._ecommerce') 2 | 3 | @section('content') 4 | 5 |
6 |
7 | Register 8 |
9 |
10 | 12 | 13 | 14 |
15 |
16 | 17 | @endsection 18 | -------------------------------------------------------------------------------- /resources/views/ecommerce/account.blade.php: -------------------------------------------------------------------------------- 1 | @extends('_layout._ecommerce') 2 | 3 | @section('content') 4 | @include('_includes._ecommerce._messages') 5 | 6 | 7 | 8 | @endsection 9 | -------------------------------------------------------------------------------- /resources/views/ecommerce/accountOrder.blade.php: -------------------------------------------------------------------------------- 1 | @extends('_layout._ecommerce') 2 | 3 | @section('content') 4 | 6 | 7 | 8 | @endsection 9 | -------------------------------------------------------------------------------- /resources/views/ecommerce/order.blade.php: -------------------------------------------------------------------------------- 1 | @extends('_layout._ecommerce') 2 | 3 | @section('content') 4 | @include('_includes._ecommerce._messages') 5 | 8 | 9 | @endsection 10 | 11 | @section('scripts') 12 | 13 | @endsection -------------------------------------------------------------------------------- /resources/views/ecommerce/search.blade.php: -------------------------------------------------------------------------------- 1 | @extends('_layout._ecommerce') 2 | 3 | @section('content') 4 |

Search for {{ $search }}

5 |
6 | @if(isset($products)) 7 | @include('ecommerce._includes._products') 8 | @else 9 |

No Products are available

10 | @endif 11 |
12 | 13 | @endsection -------------------------------------------------------------------------------- /resources/views/ecommerce/welcome.blade.php: -------------------------------------------------------------------------------- 1 | @extends('_layout._ecommerce') 2 | 3 | @section('content') 4 | @include('_includes._ecommerce._carousel') 5 |
6 | @if(isset($products)) 7 | @include('ecommerce._includes._products') 8 | @else 9 |

No Products are available

10 | @endif 11 |
12 | 13 | @endsection -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/button.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 18 | 19 |
4 | 5 | 6 | 15 | 16 |
7 | 8 | 9 | 12 | 13 |
10 | {{ $slot }} 11 |
14 |
17 |
20 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/footer.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/header.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ $slot }} 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/message.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::layout') 2 | {{-- Header --}} 3 | @slot('header') 4 | @component('mail::header', ['url' => config('app.url')]) 5 | {{ config('app.name') }} 6 | @endcomponent 7 | @endslot 8 | 9 | {{-- Body --}} 10 | {{ $slot }} 11 | 12 | {{-- Subcopy --}} 13 | @isset($subcopy) 14 | @slot('subcopy') 15 | @component('mail::subcopy') 16 | {{ $subcopy }} 17 | @endcomponent 18 | @endslot 19 | @endisset 20 | 21 | {{-- Footer --}} 22 | @slot('footer') 23 | @component('mail::footer') 24 | © {{ date('Y') }} {{ config('app.name') }}. All rights reserved. 25 | @endcomponent 26 | @endslot 27 | @endcomponent 28 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/panel.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 |
4 | 5 | 6 | 9 | 10 |
7 | {{ Illuminate\Mail\Markdown::parse($slot) }} 8 |
11 |
14 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/promotion.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 |
4 | {{ Illuminate\Mail\Markdown::parse($slot) }} 5 |
8 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/promotion/button.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 |
4 | 5 | 6 | 9 | 10 |
7 | {{ $slot }} 8 |
11 |
14 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/subcopy.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 |
4 | {{ Illuminate\Mail\Markdown::parse($slot) }} 5 |
8 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/table.blade.php: -------------------------------------------------------------------------------- 1 |
2 | {{ Illuminate\Mail\Markdown::parse($slot) }} 3 |
4 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/markdown/button.blade.php: -------------------------------------------------------------------------------- 1 | {{ $slot }}: {{ $url }} 2 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/markdown/footer.blade.php: -------------------------------------------------------------------------------- 1 | {{ $slot }} 2 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/markdown/header.blade.php: -------------------------------------------------------------------------------- 1 | [{{ $slot }}]({{ $url }}) 2 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/markdown/layout.blade.php: -------------------------------------------------------------------------------- 1 | {!! strip_tags($header) !!} 2 | 3 | {!! strip_tags($slot) !!} 4 | @isset($subcopy) 5 | 6 | {!! strip_tags($subcopy) !!} 7 | @endisset 8 | 9 | {!! strip_tags($footer) !!} 10 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/markdown/message.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::layout') 2 | {{-- Header --}} 3 | @slot('header') 4 | @component('mail::header', ['url' => config('app.url')]) 5 | {{ config('app.name') }} 6 | @endcomponent 7 | @endslot 8 | 9 | {{-- Body --}} 10 | {{ $slot }} 11 | 12 | {{-- Subcopy --}} 13 | @isset($subcopy) 14 | @slot('subcopy') 15 | @component('mail::subcopy') 16 | {{ $subcopy }} 17 | @endcomponent 18 | @endslot 19 | @endisset 20 | 21 | {{-- Footer --}} 22 | @slot('footer') 23 | @component('mail::footer') 24 | © {{ date('Y') }} {{ config('app.name') }}. All rights reserved. 25 | @endcomponent 26 | @endslot 27 | @endcomponent 28 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/markdown/panel.blade.php: -------------------------------------------------------------------------------- 1 | {{ $slot }} 2 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/markdown/promotion.blade.php: -------------------------------------------------------------------------------- 1 | {{ $slot }} 2 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/markdown/promotion/button.blade.php: -------------------------------------------------------------------------------- 1 | [{{ $slot }}]({{ $url }}) 2 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/markdown/subcopy.blade.php: -------------------------------------------------------------------------------- 1 | {{ $slot }} 2 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/markdown/table.blade.php: -------------------------------------------------------------------------------- 1 | {{ $slot }} 2 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/simple-bootstrap-4.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 17 | @endif 18 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/simple-default.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 17 | @endif 18 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 17 | return $request->user(); 18 | }); 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 16 | }); 17 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 18 | })->describe('Display an inspiring quote'); 19 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/debugbar/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/Browser/Pages/HomePage.php: -------------------------------------------------------------------------------- 1 | '#selector', 39 | ]; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /tests/Browser/Pages/Page.php: -------------------------------------------------------------------------------- 1 | '#selector', 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tests/Browser/admin/AbstractDuskAdmin.php: -------------------------------------------------------------------------------- 1 | addUser(true); 23 | $this->addProduct(); 24 | $this->browse(function (Browser $browser) use ($user) { 25 | $browser->loginAs($user) 26 | ->visit('admin/products') 27 | ->assertSee('Products Page') 28 | ->pressAndWaitFor('Delete', ['seconds' => 2]) 29 | ->assertSee('Delete book') 30 | ->press('OK') 31 | ->pause(2000) 32 | ->assertSee('You deleted the book product!'); 33 | $this->assertDatabaseMissing('products', [ 34 | 'title' => 'book' 35 | ]); 36 | }); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /tests/Browser/admin/product/ViewProductTest.php: -------------------------------------------------------------------------------- 1 | addProduct(); 22 | $product = Product::first(); 23 | $user = $this->addUser(true); 24 | $this->browse(function (Browser $browser) use ($product, $user){ 25 | $browser->loginAs($user) 26 | ->visit('admin/products') 27 | ->assertSee('Products Page') 28 | ->pause(2000) 29 | ->click('#' . $product->title . '-id') 30 | ->pause(2000) 31 | ->assertSee('Price: $' . $product->price) 32 | ->assertSee('Category: ' . $product->category->name) 33 | ->assertSee($product->description); 34 | }); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /tests/Browser/auth/AbstractLogin.php: -------------------------------------------------------------------------------- 1 | create([ 20 | 'email' => 'email@company.com', 21 | 'username' => 'coffee', 22 | 'password' => bcrypt('secret') 23 | ]); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tests/Browser/auth/LoginTest.php: -------------------------------------------------------------------------------- 1 | setUpUser(); 20 | $this->browse(function (Browser $browser) { 21 | $browser->visit('/login') 22 | ->type('email', 'email@company.com') 23 | ->type('password', 'secret') 24 | ->press('Login') 25 | ->assertPathIs('/') 26 | ->assertSee("coffee's Account") 27 | ->click('#user-account') 28 | ->assertSee('My Account') 29 | ->assertSee('Logout'); 30 | }); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /tests/Browser/auth/RegisterTest.php: -------------------------------------------------------------------------------- 1 | browse(function (Browser $browser) { 20 | $browser->visit('/register') 21 | ->type('first_name', 'Jack') 22 | ->type('last_name', 'Smith') 23 | ->type('username', 'newguy') 24 | ->type('email', 'jack@gmail.com') 25 | ->type('password', 'secret') 26 | ->type('password_confirmation', 'secret') 27 | ->press('Register') 28 | ->waitForLocation('/') 29 | ->assertPathIs('/') 30 | ->assertSee("newguy's Account"); 31 | }); 32 | $this->assertDatabaseHas('users', [ 33 | 'email' => 'jack@gmail.com' 34 | ]); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /tests/Browser/console/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/Browser/includes/AbstractIncludes.php: -------------------------------------------------------------------------------- 1 | create(['name' => $category]); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tests/Browser/screenshots/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/Browser/user/home/AboutPageTest.php: -------------------------------------------------------------------------------- 1 | browse(function (Browser $browser) { 17 | $browser->visit('/about') 18 | ->assertSee('Lara-Commerce') 19 | ->assertSee('About Us'); 20 | }); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/Browser/user/home/ContactPageTest.php: -------------------------------------------------------------------------------- 1 | browse(function (Browser $browser) { 19 | $browser->visit('/contact') 20 | ->assertSee('Lara-Commerce') 21 | ->assertSee('Customer Service') 22 | ->assertSee('customer.service') 23 | ->assertSee('Tech Support'); 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tests/Browser/user/order/UserOrderTest.php: -------------------------------------------------------------------------------- 1 | browse(function (Browser $browser) { 18 | $browser->visit('order/edit-order') 19 | ->assertPathIs('/login'); 20 | }); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/DuskTestCase.php: -------------------------------------------------------------------------------- 1 | post['_method'] = "PATCH"; 30 | } 31 | if(!$isAdmin) 32 | { 33 | $this->setPostResponseUser($this->post); 34 | return; 35 | } 36 | $this->setPostResponseAdmin($this->post); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /tests/Feature/acceptance/admin/product/NewProductFailAuthTest.php: -------------------------------------------------------------------------------- 1 | sendRequest(false, false); 16 | } 17 | 18 | /** 19 | * @group products 20 | * @group admin 21 | * @group acceptance 22 | * @test 23 | */ 24 | public function it_must_response_with_a_302() 25 | { 26 | $this->postResponse->assertStatus(302); 27 | } 28 | 29 | /** 30 | * @group products 31 | * @group admin 32 | * @group acceptance 33 | * @test 34 | */ 35 | public function it_must_not_create_a_product() 36 | { 37 | $this->assertDatabaseMissing('products', [ 38 | 'title' => $this->post['title'] 39 | ]); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /tests/Feature/acceptance/admin/product/ViewProductSuccessTest.php: -------------------------------------------------------------------------------- 1 | setUpProduct(); 21 | $this->getRoute = 'admin/products/' . $this->products[0]->id; 22 | $this->setGetResponseAdmin(); 23 | } 24 | 25 | /** 26 | * @group products 27 | * @group admin 28 | * @group acceptance 29 | * @test 30 | */ 31 | public function it_must_return_details_about_the_product() 32 | { 33 | $this->getResponse->assertJsonStructure([ 34 | 'product' => [ 35 | 'product_id', 'title', 'price', 'description', 'weight', 'category', 'image' 36 | ] 37 | ]); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /tests/Feature/acceptance/admin/sale/AbstractTestSale.php: -------------------------------------------------------------------------------- 1 | '2017-09-18T00:06:15.687Z', 17 | 'finish' => '2017-09-22T00:06:17.925Z', 18 | 'discount' => 0.25, 19 | 'product_id' => '' 20 | ]; 21 | 22 | protected $postRoute = 'admin/products/sales'; 23 | 24 | protected function setUp() 25 | { 26 | parent::setUp(); 27 | $this->setUpProduct(); 28 | $this->post['product_id'] = $this->products[0]->id; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /tests/Feature/acceptance/admin/sale/CreateNewSaleSuccessTest.php: -------------------------------------------------------------------------------- 1 | sendRequest(); 16 | } 17 | 18 | /** 19 | * @group sales 20 | * @group admin 21 | * @group acceptance 22 | * @test 23 | */ 24 | public function it_must_return_a_success_message() 25 | { 26 | $this->postResponse->assertJsonFragment(['message' => 27 | 'You have added a sale to the book product!']); 28 | } 29 | 30 | /** 31 | * @group sales 32 | * @group admin 33 | * @group acceptance 34 | * @test 35 | */ 36 | public function it_must_add_the_new_product_to_the_database() 37 | { 38 | $this->assertDatabaseHas('sales', [ 39 | 'discount' => '0.25' 40 | ]); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /tests/Feature/acceptance/admin/sale/EditSaleFailAuthTest.php: -------------------------------------------------------------------------------- 1 | setPostResponse(['_method' => 'PATCH']); 21 | $this->postResponse->assertStatus(401); 22 | } 23 | 24 | /** 25 | * @group sales 26 | * @group admin 27 | * @group acceptance 28 | * @test 29 | */ 30 | public function users_that_are_not_admin_can_not_submit_this_form() 31 | { 32 | $this->setPostResponseUser(['_method' => 'PATCH']); 33 | $this->postResponse->assertStatus(302); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /tests/Feature/acceptance/admin/sale/ViewSaleSuccessTest.php: -------------------------------------------------------------------------------- 1 | setUpSale(); 15 | $this->getRoute = 'admin/products/sales/' . $this->sale->id; 16 | $this->setGetResponseAdmin(); 17 | } 18 | 19 | /** 20 | * @group sales 21 | * @group admin 22 | * @group acceptance 23 | * @test 24 | */ 25 | public function it_must_return_the_sale_details() 26 | { 27 | $this->getResponse->assertJsonStructure([ 28 | "sale" => [ 29 | "id", "product_title", "product_description", "category", "product_price", 30 | "product_image", "discount", "discount_price", "sale_start", "sale_finish" 31 | ] 32 | ]); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /tests/Feature/acceptance/http/address/GetStatesTest.php: -------------------------------------------------------------------------------- 1 | setUpState(); 17 | $this->setGetResponse(); 18 | } 19 | 20 | /** 21 | * @group acceptance 22 | * @group addresses 23 | * @test 24 | */ 25 | public function it_must_return_the_states_in_the_database() 26 | { 27 | $this->getResponse->assertJson(['states' => [ 28 | 1 => "Colorado" 29 | ]]); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /tests/Feature/acceptance/http/homecontroller/AboutPageTest.php: -------------------------------------------------------------------------------- 1 | getResponse->assertViewIs('ecommerce.about'); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/Feature/acceptance/http/homecontroller/ContactPageTest.php: -------------------------------------------------------------------------------- 1 | getResponse->assertViewIs('ecommerce.contact'); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/Feature/acceptance/http/homecontroller/HomePageTest.php: -------------------------------------------------------------------------------- 1 | getResponse->assertViewHas('products'); 18 | } 19 | 20 | /** 21 | * @group acceptance 22 | * @group home 23 | * @test 24 | */ 25 | public function it_must_return_the_ecommerce_welcome_view() 26 | { 27 | $this->getResponse->assertViewIs('ecommerce.welcome'); 28 | } 29 | 30 | /** 31 | * @group acceptance 32 | * @group home 33 | * @test 34 | */ 35 | public function the_products_variable_must_be_an_instance_of_an_eloquent_collection() 36 | { 37 | $products = $this->getResponse->original->getData()['products']; 38 | $this->assertInstanceOf('Illuminate\Pagination\LengthAwarePaginator', $products); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /tests/Feature/acceptance/http/login/LoginUserFailedTest.php: -------------------------------------------------------------------------------- 1 | setUpUser(); 16 | $this->setPostResponse([ 17 | 'email' => 'email@company.com', 18 | 'password' => 'password' //password is secret 19 | ]); 20 | } 21 | 22 | /** 23 | * @test 24 | * @group login 25 | * @group acceptance 26 | */ 27 | public function it_must_not_log_in_the_user() 28 | { 29 | $this->assertFalse(Auth::check()); 30 | } 31 | 32 | /** 33 | * @test 34 | * @group login 35 | * @group acceptance 36 | */ 37 | public function it_must_return_an_error_message() 38 | { 39 | $error = session('errors'); 40 | $this->assertEquals('These credentials do not match our records.', 41 | $error->get('email')[0]); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /tests/Feature/acceptance/http/order/payment/failed/AbstractPaymentFailure.php: -------------------------------------------------------------------------------- 1 | assertEquals($this->addresses[0]->id, 28 | $this->orders[0]->address_id); 29 | } 30 | 31 | /** 32 | * @test 33 | * @group order 34 | * @group acceptance 35 | */ 36 | public function it_must_return_a_status_code_the_correct_status_code() 37 | { 38 | $this->postResponse->assertStatus($this->code); 39 | } 40 | 41 | /** 42 | * @test 43 | * @group order 44 | * @group acceptance 45 | */ 46 | public function it_must_return_an_error_message() 47 | { 48 | $this->postResponse->assertJson($this->message); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /tests/Feature/acceptance/http/order/route/update/UpdateOrderFailedValidationTest.php: -------------------------------------------------------------------------------- 1 | [ 23 | "The address id must be a number." 24 | ] 25 | ]; 26 | 27 | protected function setUp() 28 | { 29 | parent::setUp(); 30 | $this->setUpAddress(); 31 | $this->setUpOrderDatabase(true); 32 | $this->postRoute = 'order/' . $this->orders[0]->id; 33 | $this->setPostResponseUser([ 34 | '_method' => 'PATCH', 35 | 'address_id' => 'candy' 36 | ]); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /tests/Feature/acceptance/http/products/ViewProductFailedProductNotExistTest.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/Feature/acceptance/http/search/route/view/SearchByGetFailedTest.php: -------------------------------------------------------------------------------- 1 | getResponse->assertRedirect('/'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /tests/Feature/acceptance/http/viewAccount/ajax/GetUserAccountFailedLoginTest.php: -------------------------------------------------------------------------------- 1 | getResponse->assertStatus(401); 28 | } 29 | 30 | /** 31 | * @group acceptance 32 | * @group user_account 33 | * @test 34 | */ 35 | public function it_must_return_the_users_details() 36 | { 37 | $this->getResponse->assertJson([ 38 | 'error' => 'You are not authorized to perform this request!' 39 | ]); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /tests/Feature/acceptance/http/viewAccount/ajax/GetUserAccountSuccessTest.php: -------------------------------------------------------------------------------- 1 | setGetResponseUser(); 15 | } 16 | 17 | /** 18 | * @group acceptance 19 | * @group user_account 20 | * @test 21 | */ 22 | public function it_must_return_a_status_200() 23 | { 24 | $this->getResponse->assertStatus(200); 25 | } 26 | 27 | /** 28 | * @group acceptance 29 | * @group user_account 30 | * @test 31 | */ 32 | public function it_must_return_the_users_details() 33 | { 34 | $this->getResponse->assertJsonStructure([ 35 | 'user' => ['first_name', 'last_name', 'email', 'username'] 36 | ]); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /tests/Feature/acceptance/http/viewAccount/ajax/GetUserOrderFailLoginTest.php: -------------------------------------------------------------------------------- 1 | setUpOrderDatabase(); 17 | $this->getRoute = $this->getRoute . $this->orders[0]->id; 18 | } 19 | 20 | /** 21 | * @group acceptance 22 | * @group user_account 23 | * @test 24 | */ 25 | public function it_must_return_a_status_401() 26 | { 27 | $this->getResponse->assertStatus(401); 28 | } 29 | 30 | /** 31 | * @group acceptance 32 | * @group user_account 33 | * @test 34 | */ 35 | public function it_must_return_the_users_details() 36 | { 37 | $this->getResponse->assertJson([ 38 | 'error' => 'Unauthenticated.' 39 | ]); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /tests/Feature/acceptance/http/viewAccount/route/show/ShowUserOrderNotLoggedInTest.php: -------------------------------------------------------------------------------- 1 | getResponse->assertRedirect('login'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /tests/Feature/integration/db/models/UserModelTest.php: -------------------------------------------------------------------------------- 1 | setUpAddress(); 24 | $this->userAddresses = User::userAddresses($this->user->id); 25 | } 26 | 27 | /** 28 | * @test 29 | * @group integration 30 | * @group models 31 | */ 32 | public function it_must_be_able_to_return_all_of_the_users_addresses() 33 | { 34 | $this->assertCount(3, $this->userAddresses); 35 | } 36 | 37 | /** 38 | * @test 39 | * @group integration 40 | * @group models 41 | */ 42 | public function it_must_be_able_to_return_the_state() 43 | { 44 | $this->assertEquals('Colorado', $this->userAddresses[0]->state->name); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /tests/Feature/integration/shoppingcart/AbstractShoppingCart.php: -------------------------------------------------------------------------------- 1 | setUpProduct(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/Feature/unit/classes/SalesDateFormatTest.php: -------------------------------------------------------------------------------- 1 | assertEquals('2017-09-21', $formatDate); 18 | 19 | } 20 | 21 | /** @test */ 22 | public function it_must_return_the_correct_date() 23 | { 24 | $formatDate = SalesDateFormat::format(new \DateTime('1st Oct 2017')); 25 | $this->assertEquals('2017-10-01', $formatDate); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /tests/Feature/unit/classes/ShipDateEstimatorTest.php: -------------------------------------------------------------------------------- 1 | assertEquals('Jun 3rd, 2017', 20 | ShippingDateEstimator::arrivalDate(new \DateTime('01-06-2017'), 2)); 21 | $this->assertEquals('Jun 5th, 2017', 22 | ShippingDateEstimator::arrivalDate(new \DateTime('01-06-2017'), 4)); 23 | $this->assertEquals('Jun 11th, 2017', 24 | ShippingDateEstimator::arrivalDate(new \DateTime('01-06-2017'), 10)); 25 | } 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | getProperties() as $prop) { 22 | if (!$prop->isStatic() && 0 !== strpos($prop->getDeclaringClass()->getName(), 'PHPUnit_')) { 23 | $prop->setAccessible(true); 24 | $prop->setValue($this, null); 25 | } 26 | } 27 | gc_collect_cycles(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/Traits/SetUpCategoryTrait.php: -------------------------------------------------------------------------------- 1 | category = \App\Category::create([ 27 | 'name'=> 'clothes' 28 | ]); 29 | } 30 | 31 | /** 32 | * add categories 33 | * 34 | * @return void 35 | */ 36 | public function addCategories() 37 | { 38 | foreach ($this->newCategories as $category) 39 | { 40 | \App\Category::create([ 41 | 'name'=> $category 42 | ]); 43 | } 44 | $this->categories = \App\Category::all(); 45 | } 46 | } -------------------------------------------------------------------------------- /tests/Traits/SetUpImageTrait.php: -------------------------------------------------------------------------------- 1 | image = \App\Image::create([ 19 | 'path' => 'http://lorempixel.com/400/200' 20 | ]); 21 | } 22 | } -------------------------------------------------------------------------------- /tests/Traits/SetUpSaleTrait.php: -------------------------------------------------------------------------------- 1 | sale = new \App\Sale(); 27 | $this->setUpProduct(); 28 | $this->sale = $this->sale->create([ 29 | 'start' => '2017-09-01', 30 | 'finish' => '2017-09-20', 31 | 'discount' => '0.25', 32 | 'product_id' => $this->products[0]->id 33 | ]); 34 | } 35 | } -------------------------------------------------------------------------------- /tests/Traits/SetUpTaxTrait.php: -------------------------------------------------------------------------------- 1 | tax = \App\Tax::create([ 19 | 'name' => 'local tax', 20 | 'percent' => .02, 21 | 'description' => 'A local tax' 22 | ]); 23 | } 24 | } -------------------------------------------------------------------------------- /tests/shopping_cart_tests_helpers/NamespacedProductModelStub.php: -------------------------------------------------------------------------------- 1 | session[$key]); 8 | } 9 | public function get($key) 10 | { 11 | return $this->session[$key]; 12 | } 13 | public function put($key, $value) 14 | { 15 | $this->session[$key] = $value; 16 | } 17 | } -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const { mix } = require('laravel-mix'); 2 | const webpack = require('webpack'); 3 | 4 | mix.webpackConfig({ 5 | plugins: [ 6 | // Fix for moment.js failed to find local error 7 | new webpack.ContextReplacementPlugin(/\.\/locale$/, 'empty-module', false, /js$/) 8 | ] 9 | }); 10 | 11 | /* 12 | |-------------------------------------------------------------------------- 13 | | Mix Asset Management 14 | |-------------------------------------------------------------------------- 15 | | 16 | | Mix provides a clean, fluent API for defining some Webpack build steps 17 | | for your Laravel application. By default, we are compiling the Sass 18 | | file for the application as well as bundling up all the JS files. 19 | | 20 | */ 21 | 22 | mix.js('resources/assets/js/app.js', 'public/js') 23 | .sass('resources/assets/sass/app.scss', 'public/css') 24 | .version() 25 | .copy('node_modules/font-awesome/fonts', 'public/fonts') 26 | .copy('node_modules/bootstrap-sass/assets/fonts/bootstrap', 'public/fonts/bootstrap'); 27 | 28 | 29 | 30 | mix.js('resources/assets/js/admin.js', 'public/js') 31 | .sass('resources/assets/sass/admin.scss', 'public/css'); --------------------------------------------------------------------------------