Skip to content

Commit 60d16e2

Browse files
committed
QuickView & Login Functionality added
1 parent 75bd463 commit 60d16e2

File tree

105 files changed

+30565
-10753
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+30565
-10753
lines changed

README.md

+177-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,181 @@
1-
* PHP Artisan Commands
2-
``` console
3-
* Git Clone :
1+
<img src="docs/images/logo.png" alt="E Penguin Shop" style="margin: 0px 15%;text-align:center;"/>
2+
3+
## :heart: Application Name: <b style="color:green;"> E Penguin Shop </>
4+
<p> Single Vendor Ecommerce web application </p>
5+
</b>
6+
7+
![Admin Home Page](docs/images/admin-dashboard-dark.png)
8+
<p style="text-align:center"> (Image: Admin Dashboard Dark Theme ) </p>
9+
10+
![Admin ](docs/images/admin-dashboard-light.png)
11+
<p style="text-align:center"> (Image: Admin Dashboard (Light Theme)) </p>
12+
13+
![Home Page](docs/images/home.png)
14+
<p style="text-align:center"> (Image: Home Page </p>
15+
16+
## :hugs: Requirements
17+
* PHP >= 7.3
18+
* MySQL
19+
* Apache
20+
* Laravel >= 8.0
21+
* Composer
22+
23+
## :clap: Installation:
24+
25+
```
426
composer install
27+
528
npm install
6-
npm run watch-poll
29+
30+
php artisan cache:clear
31+
32+
php artisan key:generate
33+
34+
php artisan serve
735
```
8-
9-
>## Project Name: E Penguin Shop
10-
11-
and Install Your PWA App
1236

13-
* Happy Coding
37+
38+
<table width="80%" style="margin-top:10px;margin-bottom:10px;color:yellow;font-weight:bold;background:#012;">
39+
<thead>
40+
<th style="text-align:center;margin-left: 120px;width:40%;color:#fff">Packages</th>
41+
<th style="text-align:center;margin-left: 120px;width:40%;color:#fff"> Install Command </th>
42+
</thead>
43+
<tbody>
44+
<tr>
45+
<td> "laravel/ui": "^3.0" </td>
46+
<td> composer require laravel/ui --dev </td>
47+
<tr>
48+
<td> "silviolleite/laravelpwa": "^2.0" </td>
49+
<td> composer require silviolleite/laravelpwa </td>
50+
</tr>
51+
</tbody>
52+
</table>
53+
54+
## :hand: Features
55+
* #### ;) Backend
56+
* **Caching**
57+
* Authentication : ( *Multi Guard* ) Session based Authentication
58+
* **Repository Pattern**
59+
* Packages & Stub
60+
* Model Observer ( used for cache deleting)
61+
* Authorization: Gate, Policies
62+
* Requests, Validation , Refactoring & File Upload
63+
* Scope Filter in Model
64+
* ORM for MySQL ( Elequent ORM )
65+
*
66+
* ### :* Frontend:
67+
* Frontend Framework : `Vue Js`
68+
* Library : `IViewUi`, `Vue-owl-carousel`,`VueX`,`Vue-router`,`lodash`,`jQuery`,`axios`
69+
* `Admin LTE 3` in Admin Panel & Molla Ecommerce Template in Frontend
70+
* **Dynamic/ Auto Import Modules (Store, Routes) in frontend**
71+
* **Localization : Mutliple Languege (Bangla :bangladesh: + English :us: implemented) by `vue-i18n`**
72+
* Light/Dark Theme & Grid/List Layout
73+
* <u color="red">Code Spliting , Lazy Loading </u>, Less Ajax request
74+
*
75+
76+
77+
78+
<table width="80%" style="margin-top:10px;margin-bottom:10px;color:yellow;font-weight:bold;background:#210;">
79+
<thead>
80+
<th style="text-align:center;margin-left: 120px;width:40%;color:#fff">Node Packages</th>
81+
<th style="text-align:center;margin-left: 120px;width:40%;color:#fff"> Install Command </th>
82+
<th style="color:#fff"> Why Use It </th>
83+
</thead>
84+
<tbody>
85+
<tr>
86+
<td> "@fortawesome/fontawesome-free": "^5.15.1", </td>
87+
<td> npm install @fortawesome/fontawesome-free </td>
88+
<tr>
89+
<td> "admin-lte": "^3.0.5" </td>
90+
<td> npm install admin-lte </td>
91+
<td> Open Source Dashboard </td>
92+
</tr>
93+
<tr>
94+
<td> "moment": "^2.29.1" </td>
95+
<td> npm install admin-lte </td>
96+
</tr>
97+
<tr>
98+
<td> "view-design": "^4.4.0-rc.4"," </td>
99+
<td> npm install view-design </td>
100+
<td> UI Widget Component Library </td>
101+
</tr>
102+
<tr>
103+
<td> "vue-i18n": "^8.22.1"," </td>
104+
<td> npm install vue-i18n </td>
105+
<td> Localization </td>
106+
</tr>
107+
<tr>
108+
<td> "vform": "^1.0.1"," </td>
109+
<td> npm install v-form </td>
110+
<td> Form Validation </td>
111+
</tr>
112+
<tr>
113+
<td> "vuex": "^3.5.1" </td>
114+
<td> npm install vuex </td>
115+
<td> State Management </td>
116+
</tr>
117+
<tr>
118+
<td> "vue-router": "^3.4.6", </td>
119+
<td> npm install vue-router </td>
120+
<td> Routing </td>
121+
</tr>
122+
<tr>
123+
<td> "vuex-extensions": "^1.1.5", </td>
124+
<td> npm install vue-extensions </td>
125+
<td> RESET State & Mixins in Vuex (Tiny package) </td>
126+
</tr>
127+
<tr>
128+
<td>"vue-owl-carousel": "^2.0.3", </td>
129+
<td> npm install vue-owl-carousel </td>
130+
<td> Owl Carousel </td>
131+
</tr>
132+
<tr>
133+
<td> "vuex-persistedstate": "^4.0.0-beta.1" </td>
134+
<td> npm install vue-router </td>
135+
<td> Routing </td>
136+
</tr>
137+
<tr>
138+
<td>"vue-magnifier": "^1.0.6", </td>
139+
<td> npm install vue-magnifier </td>
140+
<td> Zoom Image </td>
141+
</tr>
142+
<tr>
143+
<td>"vue-awesome-notifications": "^3.1.1", </td>
144+
<td> npm install vue-awesome-notifications </td>
145+
<td> </td>
146+
</tr>
147+
<tr>
148+
<td> "@zeitiger/elevatezoom": "^2.5.4", </td>
149+
<td> npm install @zeitiger/elevatezoom </td>
150+
<td> </td>
151+
</tr>
152+
</tbody>
153+
</table>
154+
155+
## :sa: Roles:
156+
157+
<table>
158+
<thead>
159+
<th>Role</th>
160+
<th>URL</th>
161+
<th>Email</th>
162+
<th>Password</th>
163+
</thead>
164+
<tbody>
165+
<tr>
166+
<td>Admin</td>
167+
<td> /admin/login </td>
168+
<td>admin@admin.com</td>
169+
<td> 123456 </td>
170+
</tr>
171+
<tr>
172+
<td> Customer / User </td>
173+
<td> `/login` </td>
174+
<td>user@user.com</td>
175+
<td>123456</td>
176+
</tr>
177+
</tbody>
178+
</table>
179+
180+
181+
:heart: Happy Coding :clap:

app/Http/Controllers/Site/ProductController.php

+10-7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace App\Http\Controllers\Site;
44

55
use App\Http\Controllers\Controller;
6+
use App\Http\Resources\BrandResource;
67
use App\Http\Resources\CategoryResource;
78
use App\Http\Resources\ProductResource;
89
use App\Models\Attribute;
@@ -102,16 +103,18 @@ public function ShopByBrands()
102103
}
103104
public function SingleBrand(Request $request, $slug)
104105
{
105-
106-
// return Cache::remember('brand.'.$slug.".".$request->filter, now()->addMinute(60), function () use($slug) {
107-
return Brand::where('slug', $slug)->with(['products' => function ($q) use ($request) {
108-
$q->priceFilter($request);
109-
}])->withCount('products')->firstOrFail();
110-
// });
106+
return Cache::remember('brand.'.$slug.".".$request->filter.$request->page, now()->addMinute(60), function () use($slug,$request) {
107+
$brandProducts = Brand::where('slug', $slug)
108+
->with(['products' => function ($q) use ($request) {
109+
$q->priceFilter($request);
110+
$q->paginate();
111+
}])
112+
->firstOrFail();
113+
return new BrandResource($brandProducts);
114+
});
111115
}
112116
public function index()
113117
{
114-
115118
return Cache::remember('categories', now()->addMinutes(120), function () {
116119
return CategoryResource::collection(Category::where('id', '!=', 1)->take(6)->get());
117120
});

app/Http/Resources/BrandResource.php

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
namespace App\Http\Resources;
4+
5+
use Illuminate\Http\Resources\Json\JsonResource;
6+
use Illuminate\Support\Facades\Storage;
7+
8+
class BrandResource extends JsonResource
9+
{
10+
/**
11+
* Transform the resource into an array.
12+
*
13+
* @param \Illuminate\Http\Request $request
14+
* @return array
15+
*/
16+
public function toArray($request)
17+
{
18+
return [
19+
'id' => $this->id,
20+
'name' => $this->name,
21+
'slug' => $this->slug,
22+
'logo' => $this->logo ? url($this->logo) : Storage::url('brands/default.png'),
23+
'products' => ProductResource::collection($this->products),
24+
'products_count' => count($this->products)
25+
26+
];
27+
}
28+
}

app/Models/Brand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class Brand extends Model
1010
{
11-
use HasFactory;
11+
// use HasFactory;
1212
protected $guarded = [];
1313

1414
public function scopeSearch($query,$q)

docs/VuePerformance.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Performance
2+
3+
Vue.config.performance = process.env.NODE_ENV !== "production";
4+
5+
# Disabling reactivity Object.freeze():
6+
7+
data: function () {
8+
return {
9+
items: Object.freeze(messagesService.getMessages())
10+
}
11+
},
12+
# Lazy Loading
13+
`item : () => import(/* webpackChunkName: "Chunks/Items" */ './Items.vue)`;
14+
15+
16+
# Async & Dynamic Component Loading
17+
`const items = {
18+
components: () => import(/* webpackChunkName: "Chunks/Items" */ './Items.vue),
19+
loading,
20+
error
21+
}
22+
23+
`
24+
25+
https://github.com/sitepoint-editors/shopping-cart-async

docs/images/AuthorizationAdmin.png

46.7 KB
Loading
46.8 KB
Loading

docs/images/admin-dashboard-dark.png

95 KB
Loading

docs/images/admin-dashboard-light.png

161 KB
Loading

docs/images/admin-dashboard.png

84 KB
Loading

docs/images/home.png

1.33 MB
Loading

docs/images/logo.png

6.64 KB
Loading

public/0.js

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[0],{
2+
3+
/***/ "./resources/js/modules/attributes/router/index.js":
4+
/*!*********************************************************!*\
5+
!*** ./resources/js/modules/attributes/router/index.js ***!
6+
\*********************************************************/
7+
/*! exports provided: default */
8+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
9+
10+
"use strict";
11+
__webpack_require__.r(__webpack_exports__);
12+
/**
13+
* TEST MODULE ROUTES. THIS IS A CUSTOM ROUTES.
14+
* A TEST SET UP...
15+
* ALL TEAM MEMBERS SHOULD JUST COPY AND PASTE TO EXTENDS THE APP
16+
*/
17+
var routes = [{
18+
path: 'attributes',
19+
name: 'Attributes',
20+
component: function component() {
21+
return __webpack_require__.e(/*! import() | Chunks/Admin-Attributes */ "Chunks/Admin-Attributes").then(__webpack_require__.bind(null, /*! ../pages/attributes.vue */ "./resources/js/modules/attributes/pages/attributes.vue"));
22+
},
23+
title: 'This is a test page',
24+
meta: {
25+
guest: false,
26+
allowedUserType: ['Admin']
27+
}
28+
}];
29+
/* harmony default export */ __webpack_exports__["default"] = (routes);
30+
31+
/***/ })
32+
33+
}]);

public/1.js

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[1],{
2+
3+
/***/ "./resources/js/modules/brands/router/index.js":
4+
/*!*****************************************************!*\
5+
!*** ./resources/js/modules/brands/router/index.js ***!
6+
\*****************************************************/
7+
/*! exports provided: default */
8+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
9+
10+
"use strict";
11+
__webpack_require__.r(__webpack_exports__);
12+
/**
13+
* TEST MODULE ROUTES. THIS IS A CUSTOM ROUTES.
14+
* A TEST SET UP...
15+
* ALL TEAM MEMBERS SHOULD JUST COPY AND PASTE TO EXTENDS THE APP
16+
*/
17+
var routes = [{
18+
path: 'brands',
19+
name: 'Brands',
20+
component: function component() {
21+
return __webpack_require__.e(/*! import() | Chunks/Admin-Brands */ "Chunks/Admin-Brands").then(__webpack_require__.bind(null, /*! ../pages/brands.vue */ "./resources/js/modules/brands/pages/brands.vue"));
22+
},
23+
title: 'This is brand page',
24+
meta: {
25+
guest: false,
26+
allowedUserType: ['Admin']
27+
}
28+
}];
29+
/* harmony default export */ __webpack_exports__["default"] = (routes);
30+
31+
/***/ })
32+
33+
}]);

public/2.js

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[2],{
2+
3+
/***/ "./resources/js/modules/categories/router/index.js":
4+
/*!*********************************************************!*\
5+
!*** ./resources/js/modules/categories/router/index.js ***!
6+
\*********************************************************/
7+
/*! exports provided: default */
8+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
9+
10+
"use strict";
11+
__webpack_require__.r(__webpack_exports__);
12+
/**
13+
* TEST MODULE ROUTES. THIS IS A CUSTOM ROUTES.
14+
* A TEST SET UP...
15+
* ALL TEAM MEMBERS SHOULD JUST COPY AND PASTE TO EXTENDS THE APP
16+
*/
17+
var routes = [{
18+
path: 'categories',
19+
name: 'Categories',
20+
component: function component() {
21+
return __webpack_require__.e(/*! import() | Chunks/Admin-Categories */ "Chunks/Admin-Categories").then(__webpack_require__.bind(null, /*! ../pages/categories.vue */ "./resources/js/modules/categories/pages/categories.vue"));
22+
},
23+
title: 'This is a test page',
24+
meta: {
25+
guest: false,
26+
allowedUserType: ['Admin']
27+
}
28+
}];
29+
/* harmony default export */ __webpack_exports__["default"] = (routes);
30+
31+
/***/ })
32+
33+
}]);

0 commit comments

Comments
 (0)