├── README.md ├── resources └── views │ ├── layouts │ └── base.blade.php │ └── livewire │ ├── admin │ ├── admin-category-component.blade.php │ ├── admin-home-category-component.blade.php │ ├── admin-home-slider-component.blade.php │ ├── admin-product-component.blade.php │ └── admin-sale-component.blade.php │ └── cart-component.blade.php └── routes └── web.php /README.md: -------------------------------------------------------------------------------- 1 | # Laravel-8-E-Commerce-Pages 2 | 3 | 4 | resources\views\layouts\base.blade.php 5 | resources\views\livewire\admin 6 | resources\views\livewire\cart-component.blade.php 7 | resources\views\livewire\admin\admin-category-component.blade.php 8 | resources\views\livewire\admin\admin-home-category-component.blade.php 9 | resources\views\livewire\admin\admin-home-slider-component.blade.php 10 | resources\views\livewire\admin\admin-product-component.blade.php 11 | resources\views\livewire\admin\admin-sale-component.blade.php 12 | 13 | routes\web.php 14 | -------------------------------------------------------------------------------- /resources/views/layouts/base.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Home 8 | 9 | 10 | 11 | 12 | 13 | {{-- --}} 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | @livewireStyles 26 | 27 | 28 | 29 | 30 |
31 |
32 | x 33 |
34 |
35 |
36 | 37 | 38 | 217 | 218 | {{$slot}} 219 | 220 | 473 | 474 | 475 | 476 | 477 | 478 | {{-- --}} 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | @livewireScripts 490 | 491 | @stack('scripts') 492 | 493 | 494 | -------------------------------------------------------------------------------- /resources/views/livewire/admin/admin-category-component.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | All Categories 18 |
19 |
20 | Add New 21 |
22 |
23 |
24 |
25 | @if(Session::has('message')) 26 | 27 | @endif 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | @foreach ($categories as $category) 39 | 40 | 41 | 42 | 43 | 47 | 48 | @endforeach 49 | 50 |
IdCategory NameSlugAction
{{$category->id}}{{$category->name}}{{$category->slug}} 44 | 45 | 46 |
51 | {{$categories->links()}} 52 |
53 |
54 |
55 |
56 |
57 |
58 | -------------------------------------------------------------------------------- /resources/views/livewire/admin/admin-home-category-component.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 | Manage Home Categories 8 |
9 |
10 | @if(Session::has('message')) 11 | 12 | @endif 13 |
14 |
15 | 16 |
17 | 22 |
23 |
24 | 25 |
26 | 27 |
28 | 29 |
30 |
31 | 32 |
33 | 34 |
35 | 36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | 46 | @push('scripts') 47 | 56 | @endpush 57 | -------------------------------------------------------------------------------- /resources/views/livewire/admin/admin-home-slider-component.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | All Slides 10 |
11 |
12 | Add New Slide 13 |
14 |
15 |
16 |
17 | @if(Session::has('message')) 18 | 19 | @endif 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | @foreach ($sliders as $slider) 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 49 | 50 | @endforeach 51 | 52 |
IdImageTitleSubtitlePriceLinkStatusDateAction
{{$slider->id}}{{$slider->title}}{{$slider->subtitle}}{{$slider->price}}{{$slider->link}}{{$slider->status == 1 ? 'Active':'Inactive'}}{{$slider->created_at}} 46 | 47 | 48 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | -------------------------------------------------------------------------------- /resources/views/livewire/admin/admin-product-component.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | All Products 18 |
19 |
20 | Add New 21 |
22 |
23 |
24 |
25 | @if(Session::has('message')) 26 | 27 | @endif 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | @foreach ($products as $product) 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 57 | 58 | @endforeach 59 | 60 |
IdImageNameStockPriceSale PriceCategoryDateAction
{{$product->id}}{{$product->name}}{{$product->stock_status}}{{$product->regular_price}}{{$product->sale_price}}{{$product->category->name}}{{$product->created_at}} 54 | 55 | 56 |
61 | {{$products->links()}} 62 |
63 |
64 |
65 |
66 |
67 |
68 | -------------------------------------------------------------------------------- /resources/views/livewire/admin/admin-sale-component.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 | Sale Setting 8 |
9 |
10 | @if(Session::has('message')) 11 | 12 | @endif 13 |
14 |
15 | 16 |
17 | 21 |
22 |
23 | 24 |
25 | 26 |
27 | 28 |
29 |
30 | 31 |
32 | 33 |
34 | 35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | 45 | @push('scripts') 46 | 57 | 58 | @endpush 59 | -------------------------------------------------------------------------------- /resources/views/livewire/cart-component.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 |
6 |
    7 | 8 | 9 |
10 |
11 |
12 | 13 |
14 | @if(Session::has('success_message')) 15 |
16 | Success {{Session::get('success_message')}} 17 |
18 | @endif 19 | @if(Cart::count() > 0) 20 |

Products Name

21 | 48 | @else 49 |

No item in cart

50 | @endif 51 |
52 | 53 |
54 |
55 |

Order Summary

56 |

Subtotal${{Cart::subtotal()}}

57 |

Tax${{Cart::tax()}}

58 |

ShippingFree Shipping

59 |

Total${{Cart::total()}}

60 |
61 |
62 | 65 | Check out 66 | Continue Shopping 67 |
68 | 72 |
73 | 74 |
75 |

Most Viewed Products

76 |
77 | 221 |
222 |
223 | 224 |
225 |
226 | 227 |
-------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | name('product.cart'); 45 | 46 | Route::get('/checkout',CheckoutComponent::class); 47 | 48 | Route::get('/product/{slug}',DetailsComponent::class)->name('product.details'); 49 | 50 | Route::get('/product-category/{category_slug}',CategoryComponent::class)->name('product.category'); 51 | 52 | Route::get('/search',SearchComponent::class)->name('product.search'); 53 | 54 | // Route::middleware(['auth:sanctum', 'verified'])->get('/dashboard', function () { 55 | // return view('dashboard'); 56 | // })->name('dashboard'); 57 | 58 | 59 | //For User or Customer 60 | Route::middleware(['auth:sanctum','verified'])->group(function(){ 61 | Route::get('/user/dashboard',UserDashboardComponent::class)->name('user.dashboard'); 62 | }); 63 | 64 | //For Admin 65 | Route::middleware(['auth:sanctum','verified','authadmin'])->group(function(){ 66 | Route::get('/admin/dashboard',AdminDashboardComponent::class)->name('admin.dashboard'); 67 | Route::get('/admin/categories',AdminCategoryComponent::class)->name('admin.categories'); 68 | Route::get('/admin/category/add',AdminAddCategoryComponent::class)->name('admin.addcategory') ; 69 | Route::get('/admin/category/edit/{category_slug}',AdminEditCategoryComponent::class)->name('admin.editcategory'); 70 | Route::get('/admin/products',AdminProductComponent::class)->name('admin.products'); 71 | Route::get('/admin/product/add',AdminAddProductComponent::class)->name('admin.addproduct'); 72 | Route::get('/admin/product/edit/{product_slug}',AdminEditProductComponent::class)->name('admin.editproduct'); 73 | 74 | Route::get('/admin/slider',AdminHomeSliderComponent::class)->name('admin.homeslider'); 75 | Route::get('/admin/slider/add',AdminAddHomeSliderComponent::class)->name('admin.addhomeslider'); 76 | Route::get('/admin/slider/edit/{slide_id}',AdminEditHomeSliderComponent::class)->name('admin.edithomeslider'); 77 | 78 | Route::get('/admin/home-categories',AdminHomeCategoryComponent::class)->name('admin.homecategories'); 79 | Route::get('/admin/sale',AdminSaleComponent::class)->name('admin.sale'); 80 | 81 | }); 82 | 83 | --------------------------------------------------------------------------------