├── database ├── .gitignore ├── factories │ ├── CategoryFactory.php │ ├── CountryFactory.php │ ├── UserFactory.php │ ├── BookFactory.php │ └── AddressFactory.php ├── migrations │ ├── 2023_09_10_200332_create_categories_table.php │ ├── 2023_09_09_082617_create_countries_table.php │ ├── 2014_10_12_100000_create_password_reset_tokens_table.php │ ├── 2019_08_19_000000_create_failed_jobs_table.php │ ├── 2023_09_10_201516_create_category_book_table.php │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2023_09_24_191038_create_order_items_table.php │ ├── 2019_12_14_000001_create_personal_access_tokens_table.php │ ├── 2023_09_18_231834_create_carts_table.php │ ├── 2023_09_25_025347_create_payments_table.php │ ├── 2023_09_08_155432_create_addresses_table.php │ ├── 2023_09_10_170424_create_books_table.php │ └── 2023_09_24_182030_create_orders_table.php └── seeders │ ├── CategoryBookSeeder.php │ ├── CategorySeeder.php │ └── DatabaseSeeder.php ├── resources ├── js │ ├── Components │ │ ├── OrderCard.jsx │ │ ├── InputError.jsx │ │ ├── DarkModeToggle.jsx │ │ ├── ShareLink.jsx │ │ ├── AddToCart.jsx │ │ ├── CartToggle.jsx │ │ ├── ProfileBreadcrumb.jsx │ │ ├── BookDescription.jsx │ │ ├── CartItem.jsx │ │ ├── Pagination.jsx │ │ ├── Address.jsx │ │ ├── QuantityInput.jsx │ │ ├── BookCard.jsx │ │ ├── RelatedBooks.jsx │ │ ├── Modal.jsx │ │ ├── CartTotal.jsx │ │ ├── RandomBooks.jsx │ │ ├── UserDropdown.jsx │ │ ├── BookBanner.jsx │ │ ├── SearchBar.jsx │ │ ├── CartDrawer.jsx │ │ └── Order.jsx │ ├── Hooks │ │ ├── useCartDrawer.jsx │ │ ├── useColorMode.jsx │ │ └── useLocalStorage.jsx │ ├── Pages │ │ ├── Book │ │ │ ├── Partials │ │ │ │ ├── searchBarTheme.jsx │ │ │ │ ├── SortBy.jsx │ │ │ │ ├── ClearFilter.jsx │ │ │ │ ├── TypeFilter.jsx │ │ │ │ ├── AuthorFilter.jsx │ │ │ │ ├── CategoryFilter.jsx │ │ │ │ └── PublisherFilter.jsx │ │ │ └── Breadcrumb │ │ │ │ ├── IndexBreadcrumb.jsx │ │ │ │ └── ShowBreadcrumb.jsx │ │ ├── Address │ │ │ ├── Partials │ │ │ │ ├── AddressDefault.jsx │ │ │ │ └── AddressDelete.jsx │ │ │ └── Index.jsx │ │ ├── Cart │ │ │ ├── Partials │ │ │ │ ├── CartTable.jsx │ │ │ │ └── CartTableRow.jsx │ │ │ └── Breadcrumb │ │ │ │ └── IndexBreadcrumb.jsx │ │ ├── Checkout │ │ │ ├── Breadcrumb │ │ │ │ └── IndexBreadcrumb.jsx │ │ │ └── Partials │ │ │ │ ├── CheckoutItem.jsx │ │ │ │ └── CheckoutTotal.jsx │ │ ├── Profile │ │ │ └── Edit.jsx │ │ ├── Order │ │ │ └── Index.jsx │ │ ├── Payment │ │ │ └── Index.jsx │ │ └── Auth │ │ │ └── ForgotPassword.jsx │ ├── app.jsx │ ├── Layouts │ │ ├── FilterLayout.jsx │ │ ├── MainLayout.jsx │ │ ├── ProfileLayout.jsx │ │ └── ScrollAreaLayout.jsx │ └── bootstrap.js ├── css │ └── app.css └── views │ └── app.blade.php ├── bootstrap ├── cache │ └── .gitignore └── app.php ├── storage ├── logs │ └── .gitignore ├── app │ ├── public │ │ └── .gitignore │ └── .gitignore ├── debugbar │ └── .gitignore └── framework │ ├── testing │ └── .gitignore │ ├── views │ └── .gitignore │ ├── cache │ ├── data │ │ └── .gitignore │ └── .gitignore │ ├── sessions │ └── .gitignore │ └── .gitignore ├── public ├── robots.txt ├── favicon.ico ├── book-cloud.png ├── book-earth.png ├── book-glass.png ├── book-stack.png ├── book-store.png ├── book-background.jpg ├── book-banner-1.png ├── book-banner-2.png ├── book-images │ ├── 1.webp │ ├── 10.webp │ ├── 11.webp │ ├── 12.webp │ ├── 13.webp │ ├── 14.webp │ ├── 15.webp │ ├── 16.webp │ ├── 17.webp │ ├── 18.webp │ ├── 19.webp │ ├── 2.webp │ ├── 20.webp │ ├── 21.webp │ ├── 22.webp │ ├── 23.webp │ ├── 24.webp │ ├── 3.webp │ ├── 4.webp │ ├── 5.webp │ ├── 6.webp │ ├── 7.webp │ ├── 8.webp │ └── 9.webp ├── favicon-16x16.png ├── favicon-32x32.png ├── social-preview.png ├── apple-touch-icon.png ├── landing-banner-1.png ├── landing-banner-2.png ├── landing-banner-3.png ├── android-chrome-192x192.png ├── android-chrome-512x512.png ├── site.webmanifest ├── .htaccess ├── avatar.svg └── index.php ├── screenshots ├── screenshot-1.png ├── screenshot-2.png ├── screenshot-3.png ├── screenshot-4.png ├── screenshot-5.png ├── screenshot-6.png ├── screenshot-7.png ├── screenshot-8.png ├── screenshot-9.png ├── screenshot-10.png ├── screenshot-11.png ├── screenshot-12.png └── screenshot-13.png ├── postcss.config.js ├── jsconfig.json ├── tests ├── TestCase.php ├── Unit │ └── ExampleTest.php ├── Feature │ └── ExampleTest.php └── CreatesApplication.php ├── .gitattributes ├── app ├── Models │ ├── Country.php │ ├── Category.php │ ├── Payment.php │ ├── OrderItem.php │ ├── Address.php │ ├── Cart.php │ ├── Order.php │ └── User.php ├── Http │ ├── Controllers │ │ ├── Controller.php │ │ ├── IndexController.php │ │ ├── CheckoutController.php │ │ ├── AddressDefaultController.php │ │ ├── Auth │ │ │ ├── PasswordController.php │ │ │ ├── PasswordResetLinkController.php │ │ │ ├── RegisteredUserController.php │ │ │ ├── AuthenticatedSessionController.php │ │ │ └── NewPasswordController.php │ │ ├── BookController.php │ │ ├── PaymentController.php │ │ └── ProfileController.php │ ├── Middleware │ │ ├── EncryptCookies.php │ │ ├── VerifyCsrfToken.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── Authenticate.php │ │ ├── ValidateSignature.php │ │ ├── TrustProxies.php │ │ ├── RedirectIfAuthenticated.php │ │ └── HandleInertiaRequests.php │ ├── Requests │ │ ├── ProfileUpdateRequest.php │ │ └── Auth │ │ │ └── LoginRequest.php │ └── Kernel.php ├── Providers │ ├── BroadcastServiceProvider.php │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Console │ └── Kernel.php ├── Exceptions │ └── Handler.php └── Policies │ └── AddressPolicy.php ├── .gitignore ├── .editorconfig ├── vite.config.js ├── routes ├── channels.php ├── api.php ├── console.php ├── auth.php └── web.php ├── tailwind.config.js ├── package.json ├── config ├── cors.php ├── services.php ├── view.php ├── hashing.php ├── broadcasting.php ├── sanctum.php └── filesystems.php ├── phpunit.xml ├── .env.example ├── artisan ├── composer.json └── README.md /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite* 2 | -------------------------------------------------------------------------------- /resources/js/Components/OrderCard.jsx: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/debugbar/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/favicon.ico -------------------------------------------------------------------------------- /public/book-cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-cloud.png -------------------------------------------------------------------------------- /public/book-earth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-earth.png -------------------------------------------------------------------------------- /public/book-glass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-glass.png -------------------------------------------------------------------------------- /public/book-stack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-stack.png -------------------------------------------------------------------------------- /public/book-store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-store.png -------------------------------------------------------------------------------- /public/book-background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-background.jpg -------------------------------------------------------------------------------- /public/book-banner-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-banner-1.png -------------------------------------------------------------------------------- /public/book-banner-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-banner-2.png -------------------------------------------------------------------------------- /public/book-images/1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/1.webp -------------------------------------------------------------------------------- /public/book-images/10.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/10.webp -------------------------------------------------------------------------------- /public/book-images/11.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/11.webp -------------------------------------------------------------------------------- /public/book-images/12.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/12.webp -------------------------------------------------------------------------------- /public/book-images/13.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/13.webp -------------------------------------------------------------------------------- /public/book-images/14.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/14.webp -------------------------------------------------------------------------------- /public/book-images/15.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/15.webp -------------------------------------------------------------------------------- /public/book-images/16.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/16.webp -------------------------------------------------------------------------------- /public/book-images/17.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/17.webp -------------------------------------------------------------------------------- /public/book-images/18.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/18.webp -------------------------------------------------------------------------------- /public/book-images/19.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/19.webp -------------------------------------------------------------------------------- /public/book-images/2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/2.webp -------------------------------------------------------------------------------- /public/book-images/20.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/20.webp -------------------------------------------------------------------------------- /public/book-images/21.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/21.webp -------------------------------------------------------------------------------- /public/book-images/22.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/22.webp -------------------------------------------------------------------------------- /public/book-images/23.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/23.webp -------------------------------------------------------------------------------- /public/book-images/24.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/24.webp -------------------------------------------------------------------------------- /public/book-images/3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/3.webp -------------------------------------------------------------------------------- /public/book-images/4.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/4.webp -------------------------------------------------------------------------------- /public/book-images/5.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/5.webp -------------------------------------------------------------------------------- /public/book-images/6.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/6.webp -------------------------------------------------------------------------------- /public/book-images/7.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/7.webp -------------------------------------------------------------------------------- /public/book-images/8.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/8.webp -------------------------------------------------------------------------------- /public/book-images/9.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/book-images/9.webp -------------------------------------------------------------------------------- /public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/favicon-16x16.png -------------------------------------------------------------------------------- /public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/favicon-32x32.png -------------------------------------------------------------------------------- /public/social-preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/social-preview.png -------------------------------------------------------------------------------- /public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/apple-touch-icon.png -------------------------------------------------------------------------------- /public/landing-banner-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/landing-banner-1.png -------------------------------------------------------------------------------- /public/landing-banner-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/landing-banner-2.png -------------------------------------------------------------------------------- /public/landing-banner-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/landing-banner-3.png -------------------------------------------------------------------------------- /screenshots/screenshot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/screenshots/screenshot-1.png -------------------------------------------------------------------------------- /screenshots/screenshot-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/screenshots/screenshot-2.png -------------------------------------------------------------------------------- /screenshots/screenshot-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/screenshots/screenshot-3.png -------------------------------------------------------------------------------- /screenshots/screenshot-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/screenshots/screenshot-4.png -------------------------------------------------------------------------------- /screenshots/screenshot-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/screenshots/screenshot-5.png -------------------------------------------------------------------------------- /screenshots/screenshot-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/screenshots/screenshot-6.png -------------------------------------------------------------------------------- /screenshots/screenshot-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/screenshots/screenshot-7.png -------------------------------------------------------------------------------- /screenshots/screenshot-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/screenshots/screenshot-8.png -------------------------------------------------------------------------------- /screenshots/screenshot-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/screenshots/screenshot-9.png -------------------------------------------------------------------------------- /screenshots/screenshot-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/screenshots/screenshot-10.png -------------------------------------------------------------------------------- /screenshots/screenshot-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/screenshots/screenshot-11.png -------------------------------------------------------------------------------- /screenshots/screenshot-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/screenshots/screenshot-12.png -------------------------------------------------------------------------------- /screenshots/screenshot-13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/screenshots/screenshot-13.png -------------------------------------------------------------------------------- /public/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/android-chrome-192x192.png -------------------------------------------------------------------------------- /public/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/salimi-my/book-store/main/public/android-chrome-512x512.png -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | compiled.php 2 | config.php 3 | down 4 | events.scanned.php 5 | maintenance.php 6 | routes.php 7 | routes.scanned.php 8 | schedule-* 9 | services.json 10 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "paths": { 5 | "@/*": ["resources/js/*"] 6 | } 7 | }, 8 | "exclude": ["node_modules", "public"] 9 | } 10 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | 4 | {message} 5 |
6 | ) : null; 7 | } 8 | -------------------------------------------------------------------------------- /app/Models/Country.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 2 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 16 | 17 | [docker-compose.yml] 18 | indent_size = 2 19 | -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import laravel from 'laravel-vite-plugin'; 3 | import react from '@vitejs/plugin-react'; 4 | 5 | export default defineConfig({ 6 | plugins: [ 7 | laravel({ 8 | input: 'resources/js/app.jsx', 9 | refresh: true, 10 | }), 11 | react(), 12 | ], 13 | }); 14 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | Book::inRandomOrder()->limit(10)->get() 14 | ]); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /resources/js/Hooks/useCartDrawer.jsx: -------------------------------------------------------------------------------- 1 | import { create } from "zustand"; 2 | 3 | export const useCartDrawer = create((set) => ({ 4 | isOpen: false, 5 | onOpen: () => { 6 | document.body.classList.add("overflow-hidden"); 7 | set({ isOpen: true }); 8 | }, 9 | onClose: () => { 10 | document.body.classList.remove("overflow-hidden"); 11 | set({ isOpen: false }); 12 | }, 13 | })); 14 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | 'payment-callback' 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 16 | 17 | $response->assertStatus(200); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | 'current_password', 16 | 'password', 17 | 'password_confirmation', 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 18 | 19 | return $app; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustHosts.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | public function hosts(): array 15 | { 16 | return [ 17 | $this->allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Models/Category.php: -------------------------------------------------------------------------------- 1 | belongsToMany(Book::class, 'category_book'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | expectsJson() ? null : route('login'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /resources/js/Hooks/useColorMode.jsx: -------------------------------------------------------------------------------- 1 | import { useEffect } from "react"; 2 | import useLocalStorage from "@/Hooks/useLocalStorage"; 3 | 4 | export default function useColorMode() { 5 | const [colorMode, setColorMode] = useLocalStorage("color-theme", "light"); 6 | 7 | useEffect(() => { 8 | const className = "dark"; 9 | const bodyClass = window.document.body.classList; 10 | 11 | colorMode === "dark" 12 | ? bodyClass.add(className) 13 | : bodyClass.remove(className); 14 | }, [colorMode]); 15 | 16 | return [colorMode, setColorMode]; 17 | } 18 | -------------------------------------------------------------------------------- /database/factories/CategoryFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class CategoryFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array{cart.book_owner.title}
33 | 34 |{price}
35 |Description:
27 | {descriptionArr.map((desc, index) => ( 28 |29 | {desc} 30 |
31 | ))} 32 |33 | {price} 34 |
35 | 39 |40 | {cart.book_owner.title} 41 |
42 | 43 |Subtotal
38 |{subTotal}
39 |Shipping
42 |{shipping}
43 |Total
48 |{totalAll}
49 |17 | {address.name} 18 |
19 |20 | {address.phone} 21 |
22 |25 | {address.address}, 26 |
27 |28 | {address.postal_code} {address.city}, {address.state}, 29 |
30 |31 | {address.country} 32 |
33 | {address.default === "yes" && ( 34 |36 | Default 37 |
38 |20 | {book.publisher} 21 |
22 |{book.title}
24 | 25 |26 | {price} 27 |
28 | {book.stocks > 0 && ( 29 |30 | In Stock 31 |
32 | )} 33 | {book.stocks < 1 && ( 34 |35 | Out of Stock 36 |
37 | )} 38 |28 | These are your list of orders. 29 |
30 |44 | There are no orders currently. 45 |
46 |Total
30 |31 | {price} 32 |
33 |34 | Tax included. Shipping calculated at checkout. 35 |
36 |24 | Your payment has been successfully accepted. 25 |
26 |Thank you!
27 | 33 |43 | Your payment has been failed to be accepted. 44 |
45 |Please try again!
46 | 52 |25 | BOOK STORE 26 |
27 |28 | FIND YOUR FAVOURITE 29 |
30 |31 | BOOK HERE 32 |
33 |
36 | 43 | BOOK STORE 44 |
45 |46 | FIND YOUR FAVOURITE 47 |
48 |49 | BOOK HERE 50 |
51 |
54 | 42 | {price} 43 |
44 | 48 |49 | {cart.book_owner.title} 50 |
51 | 52 |68 | {totalPrice} 69 |
70 |
32 | Book Store
33 |
34 |
34 |
48 | These are your account's addresses details. 49 |
50 |70 | There are no addresses currently. 71 |
72 |63 | Your cart is currently empty. 64 |
65 | 66 |42 | {order.paid_at && ( 43 | 44 | PAID 45 | 46 | )} 47 | {!order.paid_at && ( 48 | 49 | UNPAID 50 | 51 | )} 52 |
53 |