You are on page 1of 176

KHWAJA YUNUS ALI

UNIVERSITY
Quest for Knowledge…

Department of
Management Information Systems (MIS)
Faculty of Business Studies
Khwaja Yunus Ali University

Final Year Project Report

Online Shopping Management Systems

Submission by

Md. Rezaul Karim


ID # 2015202020005
7th Batch, Department of MIS

Supervised by

Mohammed Nasiruzzaman
Assistant Professor & Head
Department of MIS
LETTER OF SUBMISSION

To
The Head
Department of MIS
Khwaja Yunus Ali University

Subject – Submission of Internship Report

Dear Sir,

With due respect and inform you that I have conducted my internship report on “Online
Shopping Management Systems” under the supervision of Mohammed Nasiruzzaman, Assistant
Professor & Head, Department of MIS, Khwaja Yunus Ali University. In course of completion
of the project, an internship report has been prepared under the supervision and guidance of my
supervisor.

In these circumstances, I would like to submit my Internship Report to your kind consideration
and necessities actions thereafter.

Thanking you

Obediently yours,

(Md. Rezaul Karim)


Student ID # 201520202005
DECLARATION

I hereby declare that this is the result of my own investigations, except where otherwise stated. I
also declare that is has not been previously or concurrently submitted as a whole for any other
degrees at KYAU or other institutions.
APPROVAL PAGE

I certify that I have supervised and read this study and that in my opinion, it conforms to
acceptable standards of scholarly presentation and is fully adequate in scope and quality, as Final
Year Project as partial fulfillment for a degree of Bachelor in Management Information Systems.

................................................
Md. Nasiruzzaman
Supervisor

................................................
[Examiner1 Name]
Examiner 1

................................................
[Examiner2 Name]
Examiner 2
ACKNOWLEDGEMENT

All thanks to Almighty ALLAH, the creator and the owner of this universe, the most merciful,
beneficent and the most gracious, who provided me guidance, strength and abilities to complete
the report.

First, I would like to thank Mohammad Nasiruzzaman, my project supervisor, for guiding me
through each and every step of the process with knowledge, suggestions and endless support.
This project would not have been possible without his continuous support. Thank you for your
advice, guidance and assistance.

Finally, I would like to thank my beloved parents, sister, guardians and husband for their never-
ending support, motivation and believe on me.
KEYWORDS

Term Definition

SQL server Structure query language for the database purposes. Used to define
procedures to store and retrieve data.

User A lay person who needs the system to do his task efficiently and
effectively. An account holder or a bank’s website visitor.

Database Collection of all the information monitored by this system.

PHP PHP Hypertext Preprocessor, A server side scripting language, is used to


connect the html with the SQL databases.

Computerized systems Computers, which will be used as clients to access the server database
according to its right.

Administrator A person that will be responsible for the addition and deletion of the staff
members from the general database of the system..

Software Requirements A document that completely describes all of the functions of a proposed
Specification system and the constraints under which it must operate. For example, this
document.

TABLE OF CONTENTS

Table of Contents
LETTER OF SUBMISSION.............................................................................................................................. 2

DECLARATION............................................................................................................................................... 3

APPROVAL PAGE........................................................................................................................................... 4

ACKNOWLEDGEMENT................................................................................................................................. 5

KEYWORDS..................................................................................................................................................... 6

TABLE OF CONTENTS................................................................................................................................... 7

ABSTRACT....................................................................................................................................................... 9

CHAPTER 01: INTRODUCTION.................................................................................................................. 10

1.1 MOTIVATION.......................................................................................................................................................10
1.2 CONTRIBUTION SUMMARY...............................................................................................................................10
1.3 REPORT OUTLINE.............................................................................................................................................11

CHAPTER 02: PROPOSED SYSTEM AND METHODOLOGY...................................................................12


2.1 SYSTEM BENEFIT............................................................................................................................................ 12
2.2 SOFTWARE PROCESS MODEL...........................................................................................................................14
2.3 METHODOLOGY.........................................................................................................................................15

CHAPTER 03: REQUIREMENT ANALYSIS................................................................................................ 18

3.1 USER REQUIREMENT.................................................................................................................................18


3.2 ADMINISTRATOR REQUIREMENTS.............................................................................................................19
3.3 SYSTEM REQUIREMENT.............................................................................................................................19
3.4 USE CASE DIAGRAM....................................................................................................................................21
3.5 USED PLATFORM/TOOLS............................................................................................................................22

CHAPTER 04: ANALYSIS............................................................................................................................. 24

4.1 ACTIVITY DIAGRAMS................................................................................................................................24


4.2 RISK ENGINEERING...................................................................................................................................28

CHAPTER 05: DESIGN.................................................................................................................................. 37


5.1 PROJECT DESIGN.......................................................................................................................................37

CHAPTER 06: TESTING................................................................................................................................ 41

6.1 SOFTWARE VERIFICATION AND VALIDATION............................................................................................41


6.2 SOFTWARE QUALITY ASSURANCE (SQA).................................................................................................41
6.3 TEST PLAN...................................................................................................................................................42

CHAPTER 07: IMPLEMENTATION AND MAINTENANCE......................................................................43

7.1 IMPLEMENTATLON....................................................................................................................................43
7.2 MAINTENANCE..........................................................................................................................................43
7.3 PROTOTYPE DEMOSTRATION.....................................................................................................................44

CHAPTER 08: FUTURE PLAN, CONCLUSION........................................................................................... 52

8.1 FUTURE PLAN........................................................................................................................................... 52


8.2 EXPERIENCES............................................................................................................................................52
8.3 CONCLUSIONS...........................................................................................................................................52
CHAPTER 09: INDEX.................................................................................................................................... 53

CHAPTER 10: REFERENCE....................................................................................................................... 174


ABSTRACT

The primary goal of this e-commerce site is to sell goods and services online. with building up a
web-based business/Online Shopping Management System for online item deal. It will provide
the user with a category of different products available for purchase in the store. In order to
facilitate online purchase a shopping cart will provided to the user. The system is implemented
using a 3-tier approach, with a backend relational database (such as MySQL), a middle tier of
Object-Oriented PHP, and a web browser as the front-end client. This is a task with the goal to
build up an essential site where a client is given a shopping cart application and furthermore to
think about the advances used to grow such an application. This system involves its own
database to be maintained. The information or details about the products are stored in the
database. The server process is for dealing with the customers detail and the items that are
shipped to different locations based on the addresses provided by the customers. The application
design contains two modules one is for the customers who wish to buy the product and another is
for the store owners who maintains and updates the information regarding to the product and
about the customers. The end user to use this site are the common people for whom this
application is to be hosted on the web and the admin maintains the database.
CHAPTER 01: INTRODUCTION

1.1 MOTIVATION

The primary goal behind this venture is to build up a web-arranged application which can give a
web-based shopping highlight to the clients. As it were, this undertaking planned for making a
virtual shop condition for clients, in some helpful structure, which will be accessible to them
through web.

In spite of the fact that the impression of creating web-based shopping sites are not new in the
electronic market and has been developed not long after the World Wide Web (www). It is wise
to state that the way toward shopping on the web is getting common. The goal of this task is to
build up a universally useful online business store where any item, (for example, books, CDs,
PCs, cell phones, electronic things, and home machines) can be purchased from the solace of
home through web. Clients can peruse the assortment and decision results of intrigue. Client can
login into online business site, when he signed in then consequently one shopping cart will be
made once client select a thing forget it will add to that truck. In the event that client thinks the
chose thing isn't valuable for him, at that point he can erase that thing from the truck. More data
will be expected to finish the exchange if client need to purchase thing.

As a result, the client will be approached to fill or select a charging address, a delivery address, a
transportation alternative, and select installment choice. This framework has been planned
remembering all perspectives, for example, stacking the information and multifaceted nature and
keeping up the security of client certifications.

1.2 CONTRIBUTION SUMMARY

In current system client must go to shop and request items. It is hard to distinguish the necessary
item. Additionally, there are costs for venturing out from house to shop. It requires bunches of
time and time implies a great deal to everybody. Presently individuals attempting to make
shopping framework progressively simpler by utilizing web-based shopping framework. Already
numerous works have been done on internet shopping framework yet those are less easy to use
since UI isn't easy to use. All are centered some extraordinary kinds of client that is the reason
the interface isn't easy to use for all. Here my framework guarantees that everybody can utilize
this framework all the more effectively, we centered everybody, and interface is easier to use for
all. Here we concentrated on this issue and make an easy to use interface for all, here is no
compelling reason to exceptional information for purchasing anything. Client can purchase item
without any problem.

1.3 REPORT OUTLINE

1. Chapter 02 contains existing system, proposed system and its benefit also discus on SDLC
and Methodology which is used in this project and that is waterfall model.

2. Chapter 03 discus about all types of requirements of this system also use case diagram and
all the tools which is used in this project.

3. Chapter 04 contains total analysis and diagrams also discus on project risk, project
schedule and all the function's description.

4. Chapter 05 shows the interface of this system.

5. Chapter 06 shows some of the row code of this system.

6. Chapter 07 discus about testing phases of this project.

7. Chapter 08 discus on maintenance and implementation.

8. Chapter 09 concludes the report also discuss about future opportunities from this project
and experience.
CHAPTER 02: PROPOSED SYSTEM AND METHODOLOGY

2.1 SYSTEM BENEFIT

2.1.1 Existing System

The current scenario for shopping is to visit the shops and market physically and then from the
available product list one needs to pick the item he or she wants and then payment for the same
item mostly in cash method is done, as not all the society is well educated and conscious to use
net banking or card methods or wallets etc. This system isn't a lot of easy to understand as one
needs to go to the market truly and afterward chooses things just from the accessible rundown.
So, for the most part it is hard to get the item according to our craving. Portrayal about the items
are less accessible and are for the most part verbal as it were. For this kind of shopping one needs
to have plentiful measure of spare time. Likewise, not so much great markets exist all over the
place, so often great markets become far off without a doubt individual. This current procedure
of purchasing products has a few burdens. It requires loads of time to travel to the specific shop
to purchase the products. It is having bunches of manual work. Since everybody is driving
occupied life now a days, time implies a great deal to everybody. Additionally, there are costs for
traveling from house to shop. It is less easy to understand. In current situation client must go to
shop and request items. It is hard to recognize the necessary item. Increasingly over the shop
from where we would like to purchase something may not be open every minute of every
day/365. Subsequently, we need to modify our time with the businessperson's time or merchant's
time. In current system client need to go shop to see the depiction of the item.

2.1.2 Proposed System

The proposed system helps in building a site to purchase, sell items or merchandise web-based
utilizing web association. Not at all like conventional trade that is completed genuinely with
effort of an individual to proceed to get items, my project will make it simpler for human to
lessen physical work what's more, to spare time. The fundamental idea of the application is to
permit the client to shop for all intents and purposes utilizing the Internet and permit clients to
purchase the things of their desire from the store. In this proposed system clients need not to go
to the shops for buying the items [6].
Client can arrange the item he/she wishes to purchase using this system. The shop proprietor can
be the administrator of the system. Retailer can representative authorities specially to deal with
this, who will help proprietor in dealing with the clients and item arranges. The system
additionally underwrites a home delivery system for conveying the bought items. Empowers
buyers to shop or do different exchanges 24 hours every day, throughout the entire year from
practically any area. It very well may be gotten to over the web. Buying of merchandise on the
web, client can pick various items dependent on classifications, online installments, conveyance
administrations and subsequently covering the burdens of the current framework furthermore,
making the purchasing simpler and helping the consumer to arrive at more extensive market. It
gives purchaser with more decisions. Client can buy items on the web.

A good online business webpage satisfies the accompanying elements [4, 5]:

 Knowing when a product was added or not added in the shopping card.

 Retuning to various parts of the site after adding a product to the shopping card.

 Simple checking and choosing things in a list.

 Easy scanning and selecting items in list.

 Basic route from landing page to data and request joins for explicit items.

 Evident shopping connections or catches.

 Insignificant and compelling security warning or messages.

 Steady design of item data.

 Admin has the authority to add new particulars to the items list whenever needed.

 Admin has the authority to update the description of each item.

 Permission to the admin to view information about each customer who checkouts the
items list.

 Permits the admin to alter the price of each item, whenever required or felt like.
2.1.3 Benefit of Proposed System

The main advantage of this system over traditional commerce is the user can browse online
shops, compare prices and order merchandise sitting at home on their PC [4]. Secure registration
and profile management facilities for customers. Shopping cart features include authorizations
web-based shopping clients to "place" product in the cart. It decreases the expense of making,
handling, circulating, putting away and recovering paper-based data. Rapidly, expand the
marketplace to national and universal markets. Upon "checkout' the product ascertains as
aggregate for the request including postage, pressing and expenses, if relevant. Lessens the time
between the cost of capital and the receipt of items and administrations.

2.2 SOFTWARE PROCESS MODEL


2.2.1 The Systems Development Life Cycle (SDLC)

It is a theoretical model used in project management that describes the stages involved in an
information system development project from a preliminary feasibility study through
maintenance of the completed application. Various SDLC methodologies have been developed to
guide the processes involved including the waterfall model (the original SDLC method) [2, 3].
Some methods work better for specific types of projects, but in the final analysis, the most
important factor for the success of a project may be how closely particular plan was followed
[l,2].

A Software Development Life Cycle is essentially a series of steps, or phases, that provide a
model for the development and lifecycle management of an application or piece of software. The
Software Development Life Cycle is a process that ensures good software is built. Each phase in
the life cycle has its own process and deliverables that feed into the next phase. Phases are given
bellow:
SDLC Models are: -
 Water Fall Model
 Agile Model
 The Prototyping model / Evolutionary development
 The Incremental model
 Spiral Model

2.2.2 Why Following a Model?

 Without using of a specific life cycle model, the development of a software creation
would not be in a systematic and disciplined way.
 When a software product is being developed by a team there must be a clear
understanding among team members about what to do and when to do [1, 21].
 Not following misunderstanding and project failure.

2.3 METHODOLOGY

2.3.1 Waterfall Model

The Waterfall model is the earliest SDLC approach that was used for software development.
The waterfall Model illustrates the software development process in a linear sequential flow.
This means that any phase in the development process begins only if the previous phase is
complete.

Here, using waterfall model to project.

Figure 02: Waterfall model


2.3.2 Advantage

 The waterfall model is that documentation is produced at each phase and that it fits with
other engineering process models.
 Disciplined approach
 Careful checking by the Software Quality Assurance Group toward the finish of each
stage. (Or
testing in each phase.)
 Documentation accessible toward the finish of each stage
 Linear model.
 Easy to understand and implement [1]
 Identifies deliverables and milestones

2.3.3 Why choose waterfall model?

For following reason used this model…


 My requirements are very well known, clear and fixed.
 product definition is stable.
 Technology is understood [1].
 There are no ambiguous requirements
 Sufficient assets with required skill are accessible completely.
 The project is not so long.

2.3.4 Feasibility study

The product is said to have life cycle made out of a few stages. At the feasibility stage, it is
fascinating that a few distinct arrangements will be tightened that fulfill the key specialized
prerequisites however which speak to various degree of ambition and cost. Possibility is the
assurance of whether a task quality doing. An attainability study is completed select a best
system that mate execution necessities. The information gathered during essential examination
inspects system practicalities that is probability that the system will be gainful to the association.
Four tests for attainability study are as per the following: -
 Specialized Feasibility: This is concerned about indicating hardware and programming
that will effectively fulfill the utilization significantly, however may incorporate

 The practicality to deliver yield in a given time since framework is sufficiently quick
to deal with various clients.

 Response time in specific situations and capacity to process a specific volume of


exchange of a specific speed.

 Feasibility to impart information to far off area.

This are effectively satisfying this task.

 Monetary Feasibility: Economically this system is feasible.

 Operational Feasibility: It is mostly identified with human authoritative as social


viewpoints. The focuses to be considered are - this system interface is standard, easy to
understand and gives broad assistance. Consequently, no exceptional preparing isn't
required.

 Social Feasibility: Social possibility is assurance of whether a proposed venture will be


adequate to individuals or not, so this task is absolutely Social and Feasible.
CHAPTER 03: REQUIREMENT ANALYSIS

3.1 USER REQUIREMENT

End user features that facilitate the enjoyment of Internet shopping include the following
[8]:

 Users should be able to use the ecommerce application from any Web browser
supporting HTML 3.2 (or later) and cookies.

 Visitors new to the site should be able to register by themselves. Users will be
differentiated by unique user identifiers.

 Transactions should be secure. That is, an essential authentication mechanism must


be built into the application to prevent unauthorized persons from making
transactions on a user's behalf.

 Users should be able to view a complete list of specified items available through the
site.

 Site visitors ought to have the option to search through the database utilizing
applicable keywords to recognize items of interest.

 Users should be able to select items of interest and add them to their shopping carts
for future purchase.

 Visitors should be able to modify the quantities of items in and/or delete items from
their shopping carts before checkout.

 All selected items should be shipped to the user following purchase.

 Users should be able to view the status of items they have ordered.

 Large numbers of users should be able to use the application simultaneously.


 The performance of the application should not degrade with an increase in the
number of goods or services offered.

3.2 ADMINISTRATOR REQUIREMENTS

Administrators who manage the site have specific requirements of their own [8].

 Administrators should be able to manage ecommerce applications using web


browsers.

 Data managers should be able to delete users.

 Site administrators should be able to change the status of goods purchased by


users after items have been shipped.

 Administrators ought to have the option to see all client transactions.

 Site managers should be able to view all transactions for the day.

3.3 SYSTEM REQUIREMENT


The system must provide following criteria [8] …

 User should have appropriate version of windows.

 System should have up to 2 GB ram minimum requirement for the application.

 Site should be uploaded on server.

 Need a web browser.

 Need an installed code editor.

So, this is the overall process of making the Online Shopping system worked, and
user can get the policy without any headache of agent and sometime don not need to
provide commission to them.
3.3.1 Functional Requirement
The System must provide following functionalities [8]

 Keeping records of registration of customers.


 Keeping the records of products.
 Keeping the daily sell Information.
 Storing the feedback given by the customer.
 Keeping details about the product it is delivered or not etc.
 Storing the items selected by the customer in the temporary storage/Wish list.
 Full control of admin panel will be in admin hand.

3.3.2 Non- Functional Requirements

Following Non-functional requirements will be there in the Insurance on internet [8]:

 Secure access of confidential data (customer's details).

 24 X 7 availability.
 Better module design to get better performance at ultimate time.
 Flexible service-based architecture will be highly desirable for future extension.

Nonfunctional requirements define system properties and constraints. It stands up through


user needs, because of budget constraints or organizational policies, or due to the external
factors such as safety regulations, privacy registration and so on.

Various other Non-functional requirements are [9, 10]:

 Security
 Reliability
 Portability
 Maintainability
 Extensibility
 Reusability
 Compatibility
 Resource utilization
3.4 USE CASE DIAGRAM

Following figure 03 show the use of functionality of User and the Admin of this system.
Admin can
access all the part of this system but user can only access some of the feature which are onJy
free for them.

Backend Access

Frontend Access

Registration

Update/ Delete User Info.

Browse/ View Products


End Users
ADD to Cart Products

Admin
Checkout

Order Products

Cancel Products

Process Orders

ADD Products

Update Products

Delete Products

Figure 03: Use Case Diagram of Online Shopping Management System (OSMS)
3.5 USED PLATFORM/TOOLS

 Front-End: Web pages using HTML, CSS and JavaScript. Programming Language:
PHP

 Back-End: MYSQL

 Server: XAMPP/ WAMPP (Apache)

 HTML −¿ It is used to generate web page. HTML, an initial of Hypertext Markup


Language, is the predominant markup language for web pages. It provides a means to
describe the structure of text-based information in a document- by denoting certain text
as headings, paragraphs, lists, and so on [14].

 CSS −¿ For design front end used CSS.

 JavaScript −¿ It is used for checking User information before sending to JavaScript is


a scripting language most often used for client-side web development. It is a dynamic,
weakly typed, prototype-based language with first-class functions.

 PHP−¿PHP is a technology that lets you mix regular, static HTML with dynamically
generated HTML [14]. Many Web pages that are built by CGI programs are mostly
static, with the dynamic part limited to a few small locations. But most CGI variations,
including servlets, make you generate the entire page via your program, even though
most of it is always the same. PHP is a widely used, general-purpose scripting language
that was originally designed for web development, to produce dynamic web pages. It
can be embedded into HTML and generally runs on a web server, which needs to be
configured to process PHP code and create web page content from it. It can be deployed
on most web servers and on almost every operating system and platform free of charge.
PHP is installed on over 20 million websites and 1 million web servers.

 MySQL – MySQL is a relational database management system (RDBMS) which has


more than 6 million installations. MySQL stands for "My Structured Query Language".
The program runs as a server providing multi-user access to a number of databases (14,
15]. The project's source code is available under terms of the GNU General Public
License, as well as under a variety of proprietary agreements. MySQL is commonly
used by free software projects which require a fil11-featured database management
system, such as WordPress, phpB8 and other software built on the LAMP software
stack. It is also used in very high-scale World Wide Web products including Google
and Facebook. Its popularity for use with web applications is closely tied to the
popularity of PHP, which is often combined with MySQL. Several high-traffic web
sites (including Flickr, Facebook, Wikipedia, and Google (though not for searches),
Nokia, Auction arts and YouTube) use MySQL for data storage and lo gin of user
data.

 WAMP/ XAMPP SERVER −¿ Apache is a web container, or application server


developed at the Apache Software Foundation (ASF). It adds tools for configuration
and management but can also be configured by editing configuration files that are
normally XML-formatted. Apache includes its own internal HTTP server.
CHAPTER 04: ANALYSIS

4.1 ACTIVITY DIAGRAMS

4.1.1 Admin Panel Login Activity Diagram

Below figure 04 shows the login activity of admin panel means how to login the admin
panel of this system [ I6, 17]. First admin will input username and password if information
is valid than admin will see the admin panel if info is invalid than it will stop access to
admin panel.

Admin Username & Password

Invalid

Valid

Display Admin Panel

Figure 04: Admin Panel Login Activity Diagram


4.1.2 Add Product to List Activity Diagram

Following figure 05 shows how admin can add a product in product list [17, 18]. First
admin will login by inputting username and password if it is valid than admin can add
product in list otherwise not If admin add product without any error than system will
show successful message if not than system will show error message.

Admin Username & Password

Invalid

Valid

Display Admin Panel

No
Add Product to List Error Message

Yes

Success Message

Figure 05: Add Product to List Activity Diagram


4.1.3 Order Process Activity Diagram

Following figure 06 shows the order process activity of this system [16, 18].

Admin Username & Password

Wish List

Skip

Like

Add Product to Cart

Yes

Update Cart Remove Item

Order Product

No Authentication
Registration Login

Yes

Checkout

Figure 06: Order Processing Activity Diagram


4.1.4 Checkout or Payment and Shipping Activity Diagram

Following figure 07 shows the total process of checkout or payment and shipping activity of this
system [l8]. It starts from confirm checkout phase. If customer want to buy than must have to
choose payment option and must have to input their card detail also the have to give their
shipping or billing address. After that order will be go on progress mode than admin will confirm
the order and send it to the customer and deliver the order to the customer. If customer select
cash on delivery mode than before receive product customer must have to pay the bill. Then will
be completed.
4.2 RISK ENGINEERING

4.2.1 Type of Risk

There are several kinds of risks that should be considered in any software project. The
following categories of risks had considered in this software project:

4.2.1.1 Software Risk

These risks can hamper the project plan. If these risks become real, it is likely that the
project schedule will slip and that costs will increase. Project risks identify possible
budgetary, plan, work force, asset, client and necessity issues and their effect on the
software project.

4.2.1.2 Technological Risk

These risks threaten the quality and timeliness of the software to be produced. If a
technical risk turns into a truth, execution may become difficult or impossible. Technical
risks detect potential design, implementation, interface, verification and maintenance
problems.

4.2.1.3 Business Risk

These risks threaten the feasibility of the software to be built. The business risks can be-
 Market risks: Building a system that no one really wants
 Strategic risks: Building a system that no longer fits into the overall business
strategy for the company Building a system whose business needs have been
changed.
 Management risks: Losing the support of senior management due to a change in
focus or a change in people
 Budget risks: Losing budgetary or personnel commitment

Before analyzing and managing the risks, it was necessary to identify the potential 1isks in
this project.
4.2.2 Risk Identification

Risk Identification is a step by step process to specify risks to the project plan. By
identifying known and predictable risks, it is possible to avoid or mitigate the identified
risks.

The identified risks of different categories of this software project are given below:

 Size estimate may be significantly low


 Larger number of user than planned

 Unavailability of the development software Unavailability of the required hardware


 Delivery deadline will be tightened
 Customer will change the requirement [12]
 Technology will not meet the expectation
 Stuff inexperience
 Users resist the new system

4.2.3 Risk Projection

Risk projection attempts can happen in two ways - Likelihood or Probability. That the risk
is real and the consequences of the problems associated with the risk. The risk projection
is also known as risk estimation.

Four risk projection activities have been performed to measure the risks in this project [12].
They are:

 Establish a scale that reflects the perceived likelihood of a risk define the
consequences of the risks
 Estimate the impact of the risk on the project and the product
 Note the overall accuracy of the risk projection
Following Table 01 shows the risk projection

No internet connection 1
Technology
The database used in the system cannot process as
many transactions per second as expected. 2

It is impossible to hire staffs with the required skills. 3


People Key staffs are ill and unavailable at critical times. 4
Required tanning for staffs is not available. 5
The code generated by software code generation is
6
insufficient.
Tools
Software tools can not work together in an integrated
7
way.
Changes to requirements that require major design
rework are proposed. 8
Requirements
Customers fail to understand the impact of requirement
9
changes.
The time required to develop the software is
underestimated 10

Estimation The rate of defect repair is underestimated.


11
The size of the software is underestimated
12

Table 01: Risk Projection


4.2.4 Risk Analysis
Following Table 02 shows the risk projection
Risk Probability Effects
No internet connection. [1] Moderate Serious
The database used in the system can’t process as Moderate Serious
many transactions per second as expected. [2]
It is impossible to hire staff when skill required. [3] Moderate Catastrophic
Keys staff are ill and unavailable at critical times. [4] Moderate Serious
Required training for staff is not available.[5] Moderate Tolerable
The code generated by software code generation is Moderate Tolerable
insufficient. [6]
Software tools cannot work together in an integrated Moderate Insignificant
way. [7]
Changes to requirements that require major design Moderate Serious
rework are proposed. [8]
Customers fail to understand the impact of Moderate Tolerable
requirement changes.[9]
The time required to develop the software is High Serious
underestimated.[10]
The rate of defect repair is underestimated.[11] Moderate Tolerable
The size of the software is underestimated.[12] High Tolerable

Table 02: Risk Analysis

4.2.5 Project Specification and Scheduling


4.2.5.1 Function Specification
Following Table 03 shows the function specification of this project.
Function Name Specification
Login Information F1

Customer Information F2

Product Information F3

Checkout Information F4

Wish list Information F5

Product Category Information F6

Product Band Information F7

Cart Information F8

Order Information F9

Compare Product Information F10

Search Information F11

Update Information F12

Delete Information F13

Table 03: Function Specification


4.2.5.2 Function Description

Function description describes the functions in details. It concerns on three factors: what is
the possible input, possible output for a particular function and which table of the database
uses by that function.

Login Information Fl

Input: Admin/Customer username and password.


Output: activate tbl_admin and tbl_customer table and display Admin Panel for admin
and checkout page for Customer.
User table of the database: Database: db_sbop; Table: tbl_admin and tbl_customer

Customer Information F2

Input: After login click profile

Output Activate tbl_custorner and display customer information in a page.

User table of the database: Database: db_shop; Table: tbl_customer

Product information F3

Input: Click homepage

Output: Activate tbl_product table and display in a page.

User table ofthedatabase: Oatabase: db_shop; Table: tbl_product

Checkout Information F4

Input: Insert customerusername and password Output: Activate tbl_order table and

display in a page.

User table of the database: Database: db_shop; Table: tbl_order

Wish list information F5

Input: Insert customer username and password

Output: Activate tbl_wishlisr table and display in a page.

User table of the database: Database: db_shop; Table: tbl_wisbhst


Product Category Information F6
Input: Insert Admin username and password

Output: Activate tbl_admin and tbl_category table and display admin panel with

category list

User table of the database: Database: db_shop; Table: tbl_admin and tbl_category

Product Brand Information F7

Input: Insert Admin username and password

Output: Activate Lbl_admin and tbJ_ br and table and display admin panel with brand list

User table of the database: Database: db_shop; Table: tbl_admin and tbl_brand

Cart Information F8

Input: Insert customer usemame and password

Output: Activate tbl_cart and tbl_ad.min table and display home page from there click cart

page.

User table of the database: Database: db_shop; Table: tbl_cart and tbl_admin

Order Information F9

Input: Insert Adm.in username and password

Output: Activate tbl_admin and tbl_order table and display admin panel with order list

User table oftbe database: Database: db_shop; Table: tbl_ad.min and tbl_brand

Compare Product Information F10

Input: Insert customer username and password

Output: Activate tbl_cart and tbl_admin table and display homepage from there click
compare page.

User table of the database: Database: db_shop; Table: tbl_cart and tbl_admin

Search Information Flt


Input: Search intonation.

Output: Activate required table and display information in a page.

User table of the database: Database: db_shop; Table: required table

Update Information F12

Input: Insert updated information.

Output: Activate required label and display in a page.

User table of the database: Database: db_shop; Table: required table

Delete Information Fl3

Input: Delete information.

Output: Activate required table and display in a page.

User table of the database: Database: db_shop; Table: required table


4.2.5.3 Project Schedule Chart
Following Figure 08 shows the Schedule of this project. How much time it takes to
complete the project? It also shows which part take how much time for completing this
project.

Figure 08: Project Schedule Chart


CHAPTER 05: DESIGN

5.1 PROJECT DESIGN


Tn order to design a web site, the relational database must be designed first. Conceptual
design can be divided into two parts: The data model and the process model the data
model focuses on what data should be stored in the database while the process model
deals with how the data is processed. To put this in the context of the relational database,
the data model is used to design the relational tables [19, 20]. The process model is used
to design the queries that will access and perform operations on those tables.

5.1.1 Data Model

A data model is a conceptual representation of the data structures that are required by a
database. The first step in designing a database is to develop an Entity Relation Diagram
(ERD) [19, 20]. The ERO serves as a blue print from which a relational database maybe
deduced. Figure below shows the ERO for the project.

5.1.1.1 Entity Relationship Diagram

Now we will discuss the whole ER-diagram to make better understanding. Here we have
different Entities such as Order, Customer, Product, Payment, Cart, Brand let looks one by
one which is as follow. It shows all the relationship of this system database. Entity has 3
types relationship 1st one is one to one, 2nd one is one to many and 3 rd one is many to many
which are stand for 1:1, 1: N, N:M [19, 20].
Figure 09: Entity Relationship
Diagram
5.1.2 Process Model

A Process Model tells us about how the data is processed and how the data flows from one
table to another to gather the required information. This model consists of the Functional
Decomposition Diagram and Data Flow Diagram.

5.1.2.1 Software Development Life Cycle (SDLC)

SDLC is a process used by the software industry to design, develop and test high quality
software. The SDLC aims to produce a high-quality software that meets or exceeds customer
expectations, reaches completion within times and cost estimates.

Revised Requirement
User Requirement Specification

Initial Requirement
Requirement Determination Investigation Feasibility Analysis
Decision to Design Information System
Feasibility Study

Test Plan
Functional Specification
Logical System Design

System Specification Analysis


System Implementation System Design

Physical Requirement
Configuration
System

System Evaluation Hardware Study

Schedule
Budget

Revised System System Modification Improved System

Figure 1: Software Development Life Cycle (SDLC) of Event Management system


5.1.3 Module of System

This project is divided into 9 modules…

i. Registration Module

ii. Products Browse Module

iii. Products Search Module

iv. Shopping cart Module

v. Shipping & Billing Module

vi. Payment Module

vii. Admin User Management Module

viii. Admin Catalog Management Module

ix. Admin Order Management Module

5.1.4 Interface Design

This is one of the main tasks of the developer to design a graphical user interface that user
attracts to and can use easily; in one word it should be user friendly. So, for this we should
have better understanding of customers likes and dislikes and the features that are in trend
and mesmerize the public easily, initially we need to locate the targeting people that what
kind of application do they need. After getting all this information we should start to design
the application. After checking all the information than design this project interface.
CHAPTER 06: TESTING

6.1 SOFTWARE VERIFICATION AND VALIDATION

Software testing is used in association with verification and validation. In this stage, both
individual components and the integrated whole are methodically verified to ensure that
they are error-free and fully meet the requirements outlined in the first step.

Test whole software into two parts


 Hardware
 Software
Type of testing is 2-types
 Inside test.
 Outside test.

6.1.1 Verification
Have we built the software, right? (i.e. Does it match the specification?) Yes, we built the right
software. It matches all specification.
Verification is the process of evaluating a system or component to determine whether the
products of a given development phase satisfy the conditions imposed at the start of that
phase.

6.1.2 Validation

Have we built the right software? (i.e. Is this what the customer wants?)

Validation is the process of evaluating a system or component during or at the end of the
development process to determine whether it satisfies specified requirements. Validation has
been done of this project.

6.2 SOFTWARE QUALITY ASSURANCE (SQA)

After examine and change the software engineering process itself to reduce the number of
faults that end up in the delivered software: the so-called defect rate. It has also been checked
by the specialist.
6.3 TEST PLAN

Thorough testing is critical to ensuring systems meet organizational and end-user


requirements. Test plans created during initial project phases enhance an organization's
ability to create detailed tests. A bottom-up approach tests smaller component first and
progressively adds and tests additional components and systems. A top-down approach first
tests major components and connections and progressively tests smaller components and
connections. Bottom-up tests often begin with functional (requirements based) testing.
Functional tests should ensure that expected functional, security, and internal control
features are present and operating properly. Testers then complete integration and end-to-
end testing to ensure application and system components interact properly. Users then
conduct acceptance tests to ensure systems meet defined acceptance criteria. For testing of
the website:

 All the features of the website are tested by running each function available in the
website.
 The results of the tests conducted on the website are analyzed properly.
 Only after getting satisfactory results of testing the website can be uploaded on the
network. (i.e. internet.)

Done above all of the test for this project.


CHAPTER 07: IMPLEMENTATION AND MAINTENANCE

7.1 IMPLEMENTATLON

Though this project was only for education purpose, implement it properly by the help of
some of friends and users. The implementation phase involves installing approved
applications into production environments. Primary tasks were include announcing the
implementation schedule, training end users, and installing the project. Additionally, my
mends input and verify data, configure and test system and security parameters, and
conduct post-implementation reviews. After installing the project, Input pre-existing data
manually and electronically to the new system. Verifying the accuracy of the input data and
security configurations was a critical part of the implementation process.

Organizations often run a new system in parallel with an old system until they verify the
accuracy and reliability of the new system. Employees should document any programming,
procedural, or configuration changes made during the verification process.

For implementation of the website project [13, 14):


 The website can be installed on a computer or a server which has PHP and MYSQL
installed in it.
 The owners of the website are to be properly trained to use all the features of the
website, giving details of each features of the website.
 To show the accuracy of the website and conformance of the website to the
requirements of the owners or users of the website

7.2 MAINTENANCE

The maintenance phase involves making changes to hardware, software, and


documentation to support its operational effectiveness. It includes making changes to
improve a system' s performance, correct problems, enhance security, or address user
requirements. To ensure modifications do not disrupt operations or degrade a system' s
performance or security, Organizations should establish appropriate change management
standards and procedures. Routine changes are not as complex as major modifications and
can usually be implemented in the normal course of business. Routine change controls
should include procedures for requesting, evaluating,

Approving, testing, installing, and documenting software modifications. Maintaining


accurate, up to-date hardware and software inventories is a critical part of all change
management processes. Management should carefully document all modifications to
ensure accurate system inventories. Management should coordinate all technology related
changes through an oversight committee and assign an appropriate party responsibility for
administering software patch management programs. Quality assurance, security, audit,
regulatory compliance, network, and end-user personnel should be appropriately included
in change management processes. For maintenance of the website:
 The database has to be updated regularly according to new available information.
 Redundant and false information must be removed from the database.
 Newer version of PHP and MYSQL can be used for up gradation of website and to
improve the overall performance of the system [13, 14].

7.3 PROTOTYPE DEMOSTRATION


The development of the prototype of Online Shopping Management System has already finished
and I mentioned the screenshot of the prototype below.
Customer Login/ Registration-
Cart Page -

Payment Page-
Order Confirmation Page -

Customer Order List -


Admin Login Page –

Dashboard -
Add Slider-

Category List -
Product List -
CHAPTER 08: FUTURE PLAN, CONCLUSION

8.1 FUTURE PLAN


Some of the features that will be modified and added to this system in future. Online
transaction/Credit card validation is not done. Third party proprietary software can be used
for validation check. An e-mail notification is sent to the customer as soon as the order is
placed.

8.2 EXPERIENCES
During the making/developing of this project explored new ideas and functionality behind
the working of a notepad. This project is the output of our planning, schedule, programming
skill and the hard work, and this report reflects our steps taken at various levels of
programming skill, planning and schedule. Learnt a lot during this project and liked the
improvement in my testing skills and deep concept related to these kinds of projects.

8.3 CONCLUSIONS
Finally, successfully develop and implement the site ‘Online Shopping Management
System’. With the help of various kinds of links and tools, includes all the features which
was basic requirement for an ecommerce web site. Provide an ecommerce site which is live
and running on the web. Finally got success in our attempt to take care of the needs of both
the customers as well as the administrator which was our main objectives.
CHAPTER 09: INDEX

Route -

Route::get("/","HomeController@index")->name("home");
Route::get("/how-to-order","HomeController@how2order")->name("h2o");
Route::get("/privacy-policy","HomeController@privacy")->name("privacy");
Route::get("/product-find","HomeController@findAllPro")->name("show");

Route::get("/cart", "HomeController@cart")->name("cart");
Route::get("/product-details/{id}", "HomeController@show")->name("pDetails");
Route::post("/add-to-cart", "HomeController@add2cart")->name("add2Cart");
Route::post("/add-2-cart", "HomeController@addTocart")->name("addToCart");
Route::get("/show-cart", "HomeController@show_cart")->name("showCart");
Route::get("/delete-to-cart/{id}", "HomeController@delete_cart")->name("delCart");
Route::post("/update-to-cart", "HomeController@update_cart")->name("upCart");
Route::get("/filter-product/{id}", "HomeController@filter_product")->name("filter");
Route::get("/product-filter/{id}", "HomeController@filter")->name("fil");

// Checkout Controller
Route::get("/login-check", "CheckOutController@login_check")->name("logCk");
Route::get("/checkout", "CheckOutController@index")->name("checkout");
Route::post("/customer-registration", "CheckOutController@customer_registration")-
>name("custReg");
Route::post("/customer-login", "CheckOutController@customer_login")->name("custLogin");
Route::get("/logout", "CheckOutController@log_out")->name("logout");
Route::post("/save-shipping-details", "CheckOutController@save_shipping")-
>name("saveShip");
Route::post("/place-order", "CheckOutController@order")->name("order");
Route::get("/my-order", "CheckOutController@myOrder")->name("myOrder");
Route::get("/confirm-order", "CheckOutController@confirm")->name("confirm");

Route::get("/test", "CheckOutController@test")->name("test");

// Auth Controllers
Route::get("/admin", "authController@index")->name('login');
Route::post('/admin/login-check','authController@login_check')->name('logCheck');
Route::get('/admin/logout','authController@logout')->name('logOut');
// Admin Controller
Route::get("/admin/dashboard","AdminController@index")->name("admin");
// Slider Information
Route::get("/admin/slider-create","SliderController@create")->name("slider");
Route::post("/admin/slider-add","SliderController@store")->name("addSlider");
Route::get("/admin/slider-view","SliderController@index")->name("viewSlider");
Route::get("/admin/slider-edit/{id}","SliderController@edit")->name("editSlider");

Route::get("/admin/slider-active/{id}","SliderController@active")->name("active");
Route::get("/admin/slider-inactive/{id}","SliderController@inactive")->name("inActive");
Route::post("/admin/slider-delete/{id}","SliderController@destroy")->name("delete");
Route::post("/admin/slider-update/{id}","SliderController@update")->name("updateSlider");

// Category Information
Route::get("/admin/category-create","CategoryController@create")->name("addCat");
Route::post("/admin/category-store","CategoryController@store")->name("storeCat");
Route::get("/admin/category-view","CategoryController@index")->name("viewCat");
Route::get("/admin/category-edit/{id}","CategoryController@edit")->name("editCat");

Route::get("/admin/category-active/{id}","CategoryController@active")->name("catAc");
Route::get("/admin/category-inactive/{id}","CategoryController@inactive")-
>name("catInAc");
Route::post("/admin/category-delete/{id}","CategoryController@destroy")->name("catDel");
Route::post("/admin/category-update/{id}","CategoryController@update")->name("catUp");

// Sub-Category Information
Route::get("/admin/sub-category-create","SubCategoryController@create")-
>name("addSubCat");
Route::post("/admin/sub-category-store","SubCategoryController@store")-
>name("storeSubCat");
Route::get("/admin/sub-category-view","SubCategoryController@index")-
>name("viewSubCat");
Route::get("/admin/sub-category-edit/{id}","SubCategoryController@edit")-
>name("editSubCat");

Route::get("/admin/sub-category-active/{id}","SubCategoryController@active")-
>name("subCatAc");
Route::get("/admin/sub-category-inactive/{id}","SubCategoryController@inactive")-
>name("subCatInAc");
Route::post("/admin/sub-category-delete/{id}","SubCategoryController@destroy")-
>name("subCatDel");
Route::post("/admin/sub-category-update/{id}","SubCategoryController@update")-
>name("subCatUp");

// Sub-Category Item
Route::get("/admin/sub-category-item-create","SubCategoryItemController@create")-
>name("addSubCatItem");
Route::get("/admin/sub-category-item-view","SubCategoryItemController@index")-
>name("viewSubCatItem");
Route::post("/admin/sub-category-item-store","SubCategoryItemController@store")-
>name("storeSubCatItem");
Route::post('/admin/sub-category-item-find', 'SubCategoryItemController@findSub')-
>name('findSub');
Route::get("/admin/sub-category-item-edit/{id}","SubCategoryItemController@edit")-
>name("editSubCatItem");

Route::get("/admin/sub-category-item-active/{id}","SubCategoryItemController@active")-
>name("subCatItemAc");
Route::get("/admin/sub-category-item-inactive/
{id}","SubCategoryItemController@inactive")->name("subCatItemInAc");
Route::post("/admin/sub-category-item-delete/{id}","SubCategoryItemController@destroy")-
>name("subCatItemDel");
Route::post("/admin/sub-category-item-update/{id}","SubCategoryItemController@update")-
>name("subCatItemUp");

// Product Information
Route::get("/admin/product-create","ProductController@create")->name("addPd");
Route::get("/admin/product-view","ProductController@index")->name("viewPd");
Route::post("/admin/product-store","ProductController@store")->name("storePd");
Route::post('/admin/product-search', 'ProductController@search')->name('search');
Route::post('/admin/product-find', 'ProductController@find')->name('find');
Route::get("/admin/product-edit/{id}","ProductController@edit")->name("pdEdit");
Route::get("/admin/product-view-details/{id}","ProductController@show")-
>name("pdViewDet");

Route::get("/admin/product-active/{id}","ProductController@active")->name("pdAc");
Route::get("/admin/product-inactive/{id}","ProductController@inactive")->name("pdInAc");
Route::post("/admin/product-delete/{id}","ProductController@destroy")->name("pdDel");
Route::post("/admin/product-update/{id}","ProductController@update")->name("pdUp");

// Color Information
Route::post("/admin/color-add","ColorController@store")->name("addColor");
Route::get("/admin/color-view","ColorController@index")->name("viewColor");
Route::post("/admin/color-delete/{id}","ColorController@destroy")->name("delColor");

Frontend/ Master.php -

<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Online Fashion House: The Best Seller of Sharee, Three-Pies & Clothing । Designed
& Developed by EK.</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- Place favicon.ico in the root directory -->


<link rel="shortcut icon" type="image/x-icon"
href="{{asset('frontend/images/favicon.ico')}}">
<link rel="apple-touch-icon" href="{{asset('apple-touch-icon.png')}}">

<!-- All css files are included here. -->


<!-- Bootstrap fremwork main css -->
<link rel="stylesheet" href="{{asset('frontend/css/bootstrap.min.css')}}">

<!-- font-awesome icons -->


<link href="{{asset('frontend/css/font-awesome.css')}}" rel="stylesheet">
<link href="{{asset('frontend/css/owl.carousel.css')}}" rel="stylesheet" type="text/css"
media="all"> <!-- carousel slider -->
<link href="{{asset('frontend/css/ken-burns.css')}}" rel="stylesheet" type="text/css"
media="all" /> <!-- banner slider -->
<!-- Owl Carousel main css -->
<link rel="stylesheet" href="{{asset('frontend/css/owl.carousel.min.css')}}">
<link rel="stylesheet" href="{{asset('frontend/css/owl.theme.default.min.css')}}">
<!-- This core.css file contents all plugings css file. -->
<link rel="stylesheet" href="{{asset('frontend/css/core.css')}}">
<!-- Theme shortcodes/elements style -->
<link rel="stylesheet" href="{{asset('frontend/css/shortcode/shortcodes.css')}}">
<!-- Theme main style -->
<link rel="stylesheet" href="{{asset('frontend/css/style_1.css')}}">
<!-- Responsive css -->
<link rel="stylesheet" href="{{asset('frontend/css/responsive.css')}}">
<!-- User style -->
<link rel="stylesheet" href="{{asset('frontend/css/custom.css')}}">
<link rel="stylesheet" href="{{asset('frontend/css/toastr.min.css')}}">
<!-- font-awesome icons -->
<link href="https://fonts.googleapis.com/css?
family=Hind+Siliguri:300,400,500,600,700&amp;subset=bengali,latin-ext" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Galada&display=swap"
rel="stylesheet">

<!-- Modernizr JS -->


<script src="{{asset('frontend/js/vendor/modernizr-2.8.3.min.js')}}"></script>
</head>

<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser.
Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your
experience.</p>
<![endif]-->
<!-- Body main wrapper start -->
<div class="wrapper fixed__footer">

<!-- Start Header Style -->


@yield('header')
<!-- End Header Style -->

<div class="body__overlay"></div>
<!-- Start Offset Wrapper -->
<div class="offset__wrapper">
<!-- Start Search Popap -->
<div class="search__area">
<div class="container" >
<div class="row" >
<div class="col-md-12" >
<div class="search__inner">
<form action="#" method="get">
<input class="search-placeholder" placeholder="Search a product ... "
type="text">
<button type="submit"></button>
</form>
<div class="search__close__btn">
<span class="search__close__btn_icon"><i class="zmdi zmdi-
close"></i></span>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- End Search Popap -->

<!-- Start Offset MEnu -->


<div class="offsetmenu">
<div class="offsetmenu__inner">
<div class="offsetmenu__close__btn">
<a href="#"><i class="zmdi zmdi-close"></i></a>
</div>
<div class="off__contact">
<div class="logo">
<a href="index.html">
<img src="{{asset('frontend/images/logo/logo.png')}}" alt="logo">
</a>
</div>
<p>Lorem ipsum dolor sit amet consectetu adipisicing elit sed do eiusmod
tempor incididunt ut labore.</p>
</div>
<ul class="sidebar__thumd">
<li><a href="#"><img src="{{asset('frontend/images/sidebar-img/1.jpg')}}"
alt="sidebar images"></a></li>
<li><a href="#"><img src="{{asset('frontend/images/sidebar-img/2.jpg')}}"
alt="sidebar images"></a></li>
<li><a href="#"><img src="{{asset('frontend/images/sidebar-img/3.jpg')}}"
alt="sidebar images"></a></li>
<li><a href="#"><img src="{{asset('frontend/images/sidebar-img/4.jpg')}}"
alt="sidebar images"></a></li>
<li><a href="#"><img src="{{asset('frontend/images/sidebar-img/5.jpg')}}"
alt="sidebar images"></a></li>
<li><a href="#"><img src="{{asset('frontend/images/sidebar-img/6.jpg')}}"
alt="sidebar images"></a></li>
<li><a href="#"><img src="{{asset('frontend/images/sidebar-img/7.jpg')}}"
alt="sidebar images"></a></li>
<li><a href="#"><img src="{{asset('frontend/images/sidebar-img/8.jpg')}}"
alt="sidebar images"></a></li>
</ul>
<div class="offset__widget">
<div class="offset__single">
<h4 class="offset__title">Language</h4>
<ul>
<li><a href="#"> Engish </a></li>
<li><a href="#"> French </a></li>
<li><a href="#"> German </a></li>
</ul>
</div>
<div class="offset__single">
<h4 class="offset__title">Currencies</h4>
<ul>
<li><a href="#"> USD : Dollar </a></li>
<li><a href="#"> EUR : Euro </a></li>
<li><a href="#"> POU : Pound </a></li>
</ul>
</div>
</div>
<div class="offset__sosial__share">
<h4 class="offset__title">Follow Us On Social</h4>
<ul class="off__soaial__link">
<li><a class="bg--twitter" href="#" title="Twitter"><i class="zmdi zmdi-
twitter"></i></a></li>

<li><a class="bg--instagram" href="#" title="Instagram"><i class="zmdi


zmdi-instagram"></i></a></li>

<li><a class="bg--facebook" href="#" title="Facebook"><i class="zmdi


zmdi-facebook"></i></a></li>

<li><a class="bg--googleplus" href="#" title="Google Plus"><i class="zmdi


zmdi-google-plus"></i></a></li>

<li><a class="bg--google" href="#" title="Google"><i class="zmdi zmdi-


google"></i></a></li>
</ul>
</div>
</div>
</div>
<!-- End Offset MEnu -->

<!-- Start Cart Panel -->


<div class="shopping__cart">
<div class="shopping__cart__inner">
<div class="offsetmenu__close__btn">
<a href="#"><i class="zmdi zmdi-close"></i></a>
</div>
<div class="shp__cart__wrap">
@php
$items = \Cart::getContent();
use Rakibhstu\Banglanumber\NumberToBangla;
$numto = new NumberToBangla();
@endphp
@foreach ($items as $item)
<div class="shp__single__product">
<div class="shp__pro__thumb">
<a href="#">
<img src="{{$item->attributes->image}}" alt="product images">
</a>
</div>
<div class="shp__pro__details">
<h2><a href="{{route('pDetails',$item->id)}}">{{$item-
>name}}</a></h2>
<span class="quantity popup-cart">Quantity: {{$item->quantity}}</span>
<span class="shp__price popup-cart">Price: ৳ {{number_format($item-
>price)}}</span>
</div>
<div class="remove__btn">
<a href="{{route('delCart', $item->id)}}" title="Remove this item"><i
class="zmdi zmdi-close"></i></a>
</div>
</div>
@endforeach
</div>
<ul class="shoping__total">
<li class="subtotal">Total Price:</li>
<li class="total__price">৳ {{number_format(Cart::getSubTotal())}}</li>
</ul>
<ul class="shopping__btn">
<li><a href="{{route('showCart')}}">Cart</a></li>
@php
$cust_id = Session::get('customer_id');
@endphp
<?php if ($cust_id != NULL ) { ?>
<li class="shp__checkout"><a
href="{{route('checkout')}}">Checkout</a></li>
<?php }else{ ?>
<li class="shp__checkout"><a href="{{route('logCk')}}">Checkout</a></li>
<?php } ?>
</ul>
</div>
</div>
<!-- End Cart Panel -->
</div>
<!-- End Offset Wrapper -->

{{-- Start sidebar --}}


@yield('sidebar')
{{-- End Sidebar --}}

{{-- Start Product Area --}}


@yield('content')
{{-- End Product Area --}}

<!-- Start Blog Area -->


{{-- <section class="htc__blog__area bg__white pt--100 pb--130">
<div class="container">
<div class="row">
<div class="col-xs-12">
<div class="section__title section__title--2 text-center">
<h2 class="title__line">নতু ন সংগ্রহ</h2>
<p>অঙ্কলক্ষী প্রোডাক্টস্ এ নতু ন সংগৃহিত পণ্যে রয়েছে বিশাল ছাড়। </p>
</div>
</div>
</div>
<div class="row">
<div class="blog__wrap clearfix mt--60 xmt-30">
<!-- Start Single Blog -->
<div class="col-md-4 col-lg-4 col-sm-6 col-xs-12">
<div class="blog foo">
<div class="blog__inner">
<div class="blog__thumb">
<a href="blog-details.html">
<img src="{{asset('frontend/images/blog/blog-img/1.jpg')}}"
alt="blog images">
</a>
<div class="blog__post__time">
<div class="post__time--inner">
<span class="date">14</span>
<span class="month">sep</span>
</div>
</div>
</div>
<div class="blog__hover__info">
<div class="blog__hover__action">
<p class="blog__des"><a href="blog-details.html">Lorem ipsum
dolor sit consectetu.</a></p>
<ul class="bl__meta">
<li>By :<a href="#">Admin</a></li>
<li>Product</li>
</ul>
<div class="blog__btn">
<a class="read__more__btn" href="blog-details.html">read
more</a>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- End Single Blog -->
<!-- Start Single Blog -->
<div class="col-md-4 col-lg-4 col-sm-6 col-xs-12">
<div class="blog foo">
<div class="blog__inner">
<div class="blog__thumb">
<a href="blog-details.html">
<img src="{{asset('frontend/images/blog/blog-img/2.jpg')}}"
alt="blog images">
</a>
<div class="blog__post__time">
<div class="post__time--inner">
<span class="date">14</span>
<span class="month">sep</span>
</div>
</div>
</div>
<div class="blog__hover__info">
<div class="blog__hover__action">
<p class="blog__des"><a href="blog-details.html">Lorem ipsum
dolor sit consectetu.</a></p>
<ul class="bl__meta">
<li>By :<a href="#">Admin</a></li>
<li>Product</li>
</ul>
<div class="blog__btn">
<a class="read__more__btn" href="blog-details.html">read
more</a>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- End Single Blog -->
<!-- Start Single Blog -->
<div class="col-md-4 col-lg-4 hidden-sm col-xs-12">
<div class="blog foo">
<div class="blog__inner">
<div class="blog__thumb">
<a href="blog-details.html">
<img src="{{asset('frontend/images/blog/blog-img/3.jpg')}}"
alt="blog images">
</a>
<div class="blog__post__time">
<div class="post__time--inner">
<span class="date">14</span>
<span class="month">sep</span>
</div>
</div>
</div>
<div class="blog__hover__info">
<div class="blog__hover__action">
<p class="blog__des"><a href="blog-details.html">Lorem ipsum
dolor sit consectetu.</a></p>
<ul class="bl__meta">
<li>By :<a href="#">Admin</a></li>
<li>Product</li>
</ul>
<div class="blog__btn">
<a class="read__more__btn" href="blog-details.html">read
more</a>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- End Single Blog -->
</div>
</div>
</div>
</section> --}}
<!-- End Blog Area -->

{{-- Start Footer Section --}}


@yield('footer')
{{-- End Footer Section --}}

</div>
<!-- Body main wrapper end -->
<!-- QUICKVIEW PRODUCT -->
<div id="quickview-wrapper">
<!-- Modal -->
<div class="modal fade" id="productModal" tabindex="-1" role="dialog">
<div class="modal-dialog modal__container" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-
label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body">
<div class="modal-product">
<!-- Start product images -->
<div class="product-images">
<div class="main-image images">
<img alt="big images" id="image" src="">
</div>
</div>
<!-- end product images -->
<div class="product-info">
<h1 id="name"></h1>
{{-- <div class="rating__and__review">
<ul class="rating">
<li><span class="ti-star"></span></li>
<li><span class="ti-star"></span></li>
<li><span class="ti-star"></span></li>
<li><span class="ti-star"></span></li>
<li><span class="ti-star"></span></li>
</ul>
<div class="review">
<a href="#">4 customer reviews</a>
</div>
</div> --}}
<div class="price-box-3">
<div class="s-price-box">
<span id="new_price" class="new-price"></span>
<span class="old-price">$45.00</span>
</div>
</div>
<div id = "details" class="quick-desc">

</div>
<div class="select__color">
<h2>Select color: </h2>
<div id="color">
{{-- <label class="color-tab" style="background-color:red"></label>
--}}
</div>
</div>
<div class="select__size">
<h2>Select size: </h2>
<div id="size">

</div>
</div>
<div class="addtocart-btn">
<a href="#">Add to cart</a>
</div>
</div><!-- .product-info -->
</div><!-- .modal-product -->
</div><!-- .modal-body -->
</div><!-- .modal-content -->
</div><!-- .modal-dialog -->
</div>
<!-- END Modal -->
</div>
<!-- END QUICKVIEW PRODUCT -->
<!-- Placed js at the end of the document so the pages load faster -->

<!-- jquery latest version -->


<script src="{{asset('frontend/js/vendor/jquery-1.12.0.min.js')}}"></script>
<!-- Bootstrap framework js -->
<script src="{{asset('frontend/js/bootstrap.min.js')}}"></script>
<!-- All js plugins included in this file. -->
<script src="{{asset('frontend/js/plugins.js')}}"></script>
<script src="{{asset('frontend/js/slick.min.js')}}"></script>
<script src="{{asset('frontend/js/owl.carousel.min.js')}}"></script>
<!-- Waypoints.min.js. -->
<script src="{{asset('frontend/js/waypoints.min.js')}}"></script>
<!-- Main js file that contents all jQuery plugins activation. -->
<script src="{{asset('frontend/js/main.js')}}"></script>
<script src="{{asset('frontend/js/fontawesome.min.css')}}"></script>
<script src="{{asset('frontend/js/toastr.min.js')}}"></script>
<script src="{{asset('frontend/js/cart.js')}}"></script>
{{-- <script>
$(document).ready(function(){
filter_data();

function filter_data(){
$('.filter_data').html('<div id="loading" style="" ></div>');
// $('ul.sub_cat_id li a').click(function() {
// event.preventDefault();
var sub_cat_id = 1;
// });
$.ajax({
url: "{{route('test')}}",
type: "POST",
data: {
sub_cat_id:sub_cat_id,
"_token": "{{ csrf_token() }}",
},
success:function(data){
$('.filter_data').html(data);
}
});
}

});

</script> --}}
<script>
$(document).on('click', '.detail-link', function(){
var product_id = $(this).attr("id");
console.log(product_id);
$.ajax({
type: "GET",
url:"{{route('show')}}",
data:{
product_id:product_id,
"_token": "{{ csrf_token() }}",
},
dataType:"JSON",
success:function(response){
// console.log(response);
var array = eval(response);
//                     $('[id*=Name]').val(array[0].Name);
// console.log(array);
// console.log(array[0].product_id);
// $('#name').val(array[0].product_id);
const color = array[0].product_color.split(',');
var i;
for (i = 0; i < color.length; i++) {
// console.log(words[i]);
lblcolor = document.createElement("Label");
lblcolor.style.backgroundColor = color[i];
lblcolor.className = "color-tab";
document.getElementById("color").appendChild(lblcolor);
}

const size = array[0].product_size.split(',');

for (i = 0; i < size.length; i++) {


// console.log(words[i]);
var spanSize = document.createElement("span");
spanSize.className = 'label label-default';
spanSize.style.margin = '5px';
spanSize.textContent = size[i];
document.getElementById("size").appendChild(spanSize);
}

document.getElementById("name").innerHTML = array[0].product_name;
document.getElementById("new_price").innerHTML = '৳ '
+array[0].product_price;
document.getElementById("image").src = array[0].product_image;

},
error: function(error) {
console.log(error);
}
});
});
</script>
<script>
$(document).on('click', '.close', function(){
document.getElementById('color').innerHTML = '';
document.getElementById('size').innerHTML = '';
});
</script>
<script>

@if (Session::has('message'))
var type = "{{ Session::get('alert-type', 'info') }}"
switch(type){
case 'info':

toastr.options.timeOut = 10000;
toastr.info("{{Session::get('message')}}");
var audio = new Audio('audio.mp3');
audio.play();
break;
case 'success':
toastr.options.timeOut = 10000;
toastr.success("{{Session::get('message')}}");
var audio = new Audio('audio.mp3');
audio.play();

break;
case 'warning':

toastr.options.timeOut = 10000;
toastr.warning("{{Session::get('message')}}");
var audio = new Audio('audio.mp3');
audio.play();

break;
case 'error':

toastr.options.timeOut = 10000;
toastr.error("{{Session::get('message')}}");
var audio = new Audio('audio.mp3');
audio.play();

break;
}
@endif
</script>
</body>

</html>

Frontend/Content.php -

@section('content')
<!-- End Feature Product -->
<div class="only-banner bg__white">
<div class="container">
<div class="only-banner-img">
<a href="shop-sidebar.html"><img src="" alt=""></a>
</div>
</div>
</div>
@php
use Rakibhstu\Banglanumber\NumberToBangla;
$numto = new NumberToBangla();
@endphp

@foreach ($sub_cat as $subCat)


@php
$sub_id = $subCat->sub_cat_id;

$sub_cat_item =DB::table('sub__category__items')
->select('sub__category__items.*')
->where('status', 1)
->where('sub__category__items.sub_cat_id', $sub_id)
->orderby('sub_cat_id', 'asc')
->get();
@endphp
<!-- Start Our Product Area -->
<section class="htc__product__area ptb--100 bg__white">
<div class="container">
<div class="row">
<div class="col-md-3">
<div class="product-categories-all">
<div class="product-categories-title">
<h3>{{$subCat->sub_cat_name}}</h3>
</div>
<div class="product-categories-menu">
<ul class="sub_cat_id">
@foreach ($sub_cat_item as $subCatItem)
<li><a href="{{route('filter',Hashids::encode($subCatItem-
>sub_cat_item_id))}}" id="{{$subCatItem->sub_cat_item_id}}">{{$subCatItem-
>sub_cat_item_name}}</a></li>
@endforeach
</ul>
</div>
</div>
</div>
<div class="col-md-9">
<div class="product-style-tab">
<div class="product-tab-list">
<!-- Nav tabs -->
<ul class="tab-style product-tab-list-btn" role="tablist">
<li class="active">
<a href="#home9" data-toggle="tab">
<div class="tab-menu-text">
<h4><strong>New</strong> </h4>
</div>
</a>
</li>
{{-- <li>
<a href="#home10" data-toggle="tab">
<div class="tab-menu-text">
<h4><strong>জনপ্রিয়</strong> </h4>
</div>
</a>
</li> --}}
</ul>
<div class="all-product-btn">
<a href="shop-sidebar.html"><strong>All Products</strong></a>
</div>
</div>
<div class="tab-content another-product-style jump">
<div class="tab-pane active" id="home9">
<div class="row">
<div class="product-slider-active2 filter_data">
@php
$product =DB::table('products')
->join('sub__category__items', 'products.sub_cat_item_id',
'=', 'sub__category__items.sub_cat_item_id')
->join('sub_categories', 'sub__category__items.sub_cat_id',
'=', 'sub_categories.sub_cat_id')
->select('products.*')
->where('products.status', 1)
->where('sub_categories.status', 1)
->where('sub__category__items.status', 1)
->where('sub_categories.sub_cat_id', $sub_id)
->orderby('product_id', 'desc')
->get();
@endphp
@foreach($product as $pro)
<div class="col-md-3 single__pro col-lg-3 cat--1 col-sm-3 col-xs-
12">
<div class="product">
<div class="product__inner">
<div class="pro__thumb">
<a href="{{route('pDetails', $pro->product_id)}}">
<img src="{{URL::to($pro->product_image)}}"
alt="product images">
</a>
</div>
<div class="product__hover__info">
<ul class="product__action">
<li>
<form method='POST' action="{{route('addToCart')}}">
{{ csrf_field() }}
<input type="hidden" name="product_id"
value="{{$pro->product_id}}">
<input type="hidden" name="qty" value="1">
<button type="submit" class="btn btn-defalult
btn_cart"><span class="ti-shopping-cart"></span></button>
</form>
</li>
<li><a title="Wishlist" href="wishlist.html"><span
class="ti-heart"></span></a></li>
</ul>
</div>
</div>

<div class="product__details">
<h2><a href="{{route('pDetails', $pro-
>product_id)}}">{{$pro->product_name}}</a></h2>
<ul class="product__price">
<li class="old__price"> ৳ {{$numto-
>bnNum(number_format($pro->product_price))}}</li>
<li class="new__price"> ৳ {{$numto-
>bnNum(number_format($pro->product_price - ($pro->product_price * $pro-
>product_discount /100)))}}</li>
</ul>
</div>
</div>
</div>
@endforeach
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- End Our Product Area -->
@endforeach
@endsection

Frontend/Header.php -

@section('header')
<header id="header" class="htc-header header--3 bg__white">
<!-- Start Mainmenu Area -->
<div id="sticky-header-with-topbar" class="mainmenu__area sticky__header">
<div class="container">
<div class="row">
<div class="w3ls-header"><!--header-one-->
<div class="w3ls-header-left">
<p><a href="#"><i class="fa fa-phone" aria-hidden="true"></i>&nbsp 01400-605419
&nbsp & &nbsp 01974-474294</a></p>
</div>
<div class="w3ls-header-right">
<ul>
<li class="dropdown head-dpdn">
<a href="#" class="dropdown-toggle"><i class="fa fa-comments" aria-
hidden="true"></i> Suggestion</a>
</li>
<li class="dropdown head-dpdn">
<a href="#" class="dropdown-toggle"><i class="fa fa-compass" aria-
hidden="true"></i> Track Order</a>
</li>
<li class="dropdown head-dpdn">
<a href="#" class="dropdown-toggle"><i class="fa fa-question-circle" aria-
hidden="true"></i> Help</a>
</li>
<li class="dropdown head-dpdn">
@php
$cust_id = Session::get('customer_id');
$cust_name = Session::get('customer_name');
@endphp
<?php if ($cust_id != NULL && $cust_name != NULL) { ?>
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-
user" aria-hidden="true"></i> {{$cust_name}}<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="{{route('logout')}}"><i class="fa fa-sign-in" aria-
hidden="true"></i> Logout </a></li>
{{-- <li><a href="#"><i class="fa fa-user-plus" aria-hidden="true"></i>
রেজিস্ট্রেশন</a></li> --}}
<li><a href="{{route('myOrder')}}"><i class="fa fa-cart-arrow-down" aria-
hidden="true"></i> My Order</a></li>
</ul>
<?php }else{?>
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-
user" aria-hidden="true"></i> User Name<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="{{route('logCk')}}"><i class="fa fa-sign-in" aria-
hidden="true"></i> Login </a></li>
<li><a href="#"><i class="fa fa-user-plus" aria-hidden="true"></i>
Registration</a></li>
<li><a href="#"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i> My
Orders</a></li>
</ul>
<?php } ?>
</li>
</ul>
</div>
<div class="clearfix"> </div>
</div>

</div>
<div class="row">
<div class="col-md-2 col-lg-2 col-sm-3 col-xs-3">
<div class="logo">
<a href="{{route('home')}}">
<img src="{{asset('frontend/images/logo/logo.png')}}" alt="logo">
</a>
</div>
</div>

<!-- Start MAinmenu Ares -->


<div class="col-md-8 col-lg-8 col-sm-6 col-xs-6">
<div class="header-search">
<form action="#" method="post">
<input type="search" name="Search" placeholder="Search Product ..."
required="">
<button type="submit" class="btn btn-default" aria-label="Left Align">
<i class="fa fa-search"></i>
</button>
</form>
</div>
<div class="mobile-menu clearfix visible-xs visible-sm">
<nav id="mobile_dropdown">
<ul>
<li><a href="index.html" class="m-cat-item">Women Fashion</a>
<ul>
<li><a href="portfolio-card-box-2.html">Sharee</a>
<ul>
<li><a href="portfolio-card-box-2.html">Jamdani</a></li>
<li><a href="single-portfolio.html">Suti Jamdani</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="index.html" class="m-cat-item">Male Fashion</a>
<ul>
<li><a href="portfolio-card-box-2.html">Shirt</a>
<ul>
<li><a href="portfolio-card-box-2.html">Blue</a></li>
<li><a href="single-portfolio.html">White</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="blog.html">blog</a>
<ul>
<li><a href="blog.html">blog 3 column</a></li>
<li><a href="blog-details.html">Blog details</a></li>
</ul>
</li>
<li><a href="#">pages</a>
<ul>
<li><a href="about.html">about</a></li>
<li><a href="customer-review.html">customer review</a></li>
<li><a href="shop.html">shop</a></li>
<li><a href="shop-sidebar.html">shop sidebar</a></li>
<li><a href="product-details.html">product details</a></li>
<li><a href="cart.html">cart</a></li>
<li><a href="wishlist.html">wishlist</a></li>
<li><a href="checkout.html">checkout</a></li>
<li><a href="team.html">team</a></li>
<li><a href="login-register.html">login & register</a></li>
</ul>
</li>
<li><a href="contact.html">contact</a></li>
</ul>
</nav>
</div>
</div>
<!-- End MAinmenu Ares -->
@php
$cartCollection = Cart::getContent();
@endphp
<div class="col-md-2 col-sm-4 col-xs-3">
<ul class="menu-extra">
<li class="search search__open"><i class="fa fa-search fa-2x"></i></li>
<li class="cart__menu"><i class="fa fa-cart-arrow-down fa-3x" aria-
hidden="true"><span class="badge badge-light">{{$cartCollection-
>count()}}</span></i></li>
<li class="toggle__menu hidden-xs hidden-sm"><i class="fa fa-bars fa-
2x"></i></li>
</ul>
</div>
</div>
<div class="mobile-menu-area"></div>
</div>
</div>
<!-- End Mainmenu Area -->
</header>
@endsection

Frontend/Footer.php -

@section('footer')
<!-- Start Footer Area -->
<footer class="htc__foooter__area gray-bg">
<div class="container">
<div class="row">
<div class="footer__container clearfix">
<!-- Start Single Footer Widget -->
<div class="col-md-3 col-lg-3 col-sm-6">
<div class="ft__widget">
<div class="ft__logo">
<a href="{{route('home')}}">
<img src="{{asset('frontend/images/logo/logo.png')}}" alt="footer
logo">
</a>
</div>
<div class="footer-address">
<ul>
<li>
<div class="address-icon">
<i class="zmdi zmdi-pin"></i>
</div>
<div class="address-text">
<p>Enayetpur, Chawhali, Sirajgonj</p>
</div>
</li>
<li>
<div class="address-icon">
<i class="zmdi zmdi-email"></i>
</div>
<div class="address-text">
<a href="#"> info@example.com</a>
</div>
</li>
<li>
<div class="address-icon">
<i class="zmdi zmdi-phone-in-talk"></i>
</div>
<div class="address-text">
<p>+012 345 678 102 </p>
</div>
</li>
</ul>
</div>
<ul class="social__icon">
<li><a href="#"><i class="zmdi zmdi-twitter"></i></a></li>
<li><a href="#"><i class="zmdi zmdi-instagram"></i></a></li>
<li><a href="#"><i class="zmdi zmdi-facebook"></i></a></li>
<li><a href="#"><i class="zmdi zmdi-google-plus"></i></a></li>
</ul>
</div>
</div>
<!-- End Single Footer Widget -->
<!-- Start Single Footer Widget -->
<div class="col-md-3 col-lg-2 col-sm-6 smt-30 xmt-30">
<div class="ft__widget">
<h2 class="ft__title">Product List</h2>
<ul class="footer-categories">
<li><a href="shop-sidebar.html">Men</a></li>
<li><a href="shop-sidebar.html">Women</a></li>
<li><a href="shop-sidebar.html">Accessories</a></li>
<li><a href="shop-sidebar.html">Shoes</a></li>
<li><a href="shop-sidebar.html">Dress</a></li>
<li><a href="shop-sidebar.html">Denim</a></li>
</ul>
</div>
</div>
<!-- Start Single Footer Widget -->
<div class="col-md-3 col-lg-2 col-sm-6 smt-30 xmt-30">
<div class="ft__widget">
<h2 class="ft__title">Quick Links</h2>
<ul class="footer-categories">
<li><a href="{{route('home')}}">Home</a></li>
<li><a href="about.html">About Us</a></li>
<li><a href="{{route('h2o')}}">How to Order</a></li>
<li><a href="#">Return & Change</a></li>
<li><a href="#">Terms & Condition</a></li>
<li><a href="{{route('privacy')}}">Privacy Policy</a></li>
</ul>
</div>
</div>
<!-- Start Single Footer Widget -->
<div class="col-md-3 col-lg-3 col-lg-offset-1 col-sm-6 smt-30 xmt-30">
<div class="ft__widget">
<h2 class="ft__title">Newsletter</h2>
<div class="newsletter__form">
<p>Subscribe to our newsletter and get 10% off your first purchase
.</p>
<div class="input__box">
<div id="mc_embed_signup">
<form action="#" method="post" id="mc-embedded-subscribe-
form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll"
class="htc__news__inner">
<div class="news__input">
<input type="email" value="" name="EMAIL"
class="email" id="mce-EMAIL" placeholder="Email Address" required>
</div>
<!-- real people should not fill this in and expect good
things - do not remove this or risk form bot signups-->
<div style="position: absolute; left: -5000px;" aria-
hidden="true"><input type="text" name="b_6bbb9b6f5827bd842d9640c82_05d85f18ef"
tabindex="-1" value=""></div>
<div class="clearfix subscribe__btn"><input type="submit"
value="Send" name="subscribe" id="mc-embedded-subscribe" class="bst__btn btn--
white__color">

</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- End Single Footer Widget -->
</div>
</div>
<!-- Start Copyright Area -->
<div class="htc__copyright__area">
<div class="row">
<div class="col-md-12 col-lg-12 col-sm-12 col-xs-12">
<div class="copyright__inner">
<div class="copyright">
<p>© 2020 All Right Reserved. Designed & Developed by <a>Elias
Khan (EK)</a></p>
</div>
<ul class="footer__menu">
<li><a href="index.html">Home</a></li>
<li><a href="shop.html">All Products</a></li>
<li><a href="contact.html">Contact Us</a></li>
</ul>
</div>
</div>
</div>
</div>
<!-- End Copyright Area -->
</div>
</footer>
<!-- End Footer Area -->
@endsection

Frontend/Sidebar.php-

@section('sidebar')
<!-- Start Feature Product -->
<section class="categories-slider-area bg__white">
<div class="container">
<div class="row">
{{-- Slider Section --}}
<div class="col-md-9 col-lg-9 col-sm-8 col-xs-12 float-left-style">
<!-- banner -->
<div class="banner">
<div id="kb" class="carousel kb_elastic animate_text kb_wrapper" data-
ride="carousel" data-interval="6000" data-pause="hover">
<!-- Wrapper-for-Slides -->

<div class="carousel-inner" role="listbox">


@php
$i = 0;
@endphp
@foreach ($slider as $slider)
@php
$i++;
@endphp
@if ($i == 1)
<div class="item active"><!-- First-Slide -->
@else
<div class="item"><!-- First-Slide -->
@endif
<img src="{{URL::to($slider->image)}}" alt="" class="img-responsive" />
<div class="carousel-caption kb_caption {{$slider->position}}">
<h3 data-animation="animated flipInX">{{$slider->title}}</h3>
<h4 data-animation="animated flipInX">{{$slider-
>sub_title}}</span></h4>
</div>
</div>
@endforeach

{{-- <div class="item"> <!-- Second-Slide -->


<img src="{{asset('frontend/images/slider/bg/Slider_1.jpg')}}" alt="" class="img-
responsive" />
<div class="carousel-caption kb_caption kb_caption_center">
<h3 data-animation="animated fadeInDown">ঢাকাইয়া জামদানি</h3>
<h4 data-animation="animated fadeInUp">বিশেষ অফার চলছে</h4>
</div>
</div>
<div class="item"><!-- Third-Slide -->
<img src="{{asset('frontend/images/slider/bg/Slider_2.jpg')}}" alt="" class="img-
responsive"/>
<div class="carousel-caption kb_caption kb_caption_left">
<h3 data-animation="animated fadeInLeft">ঢাকাইয়া জামদানি</h3>
<h4 data-animation="animated flipInX">বিশেষ অফার চলছে</h4>
</div>
</div>
<div class="item"><!-- Third-Slide -->
<img src="{{asset('frontend/images/slider/bg/Slider_3.jpg')}}" alt="" class="img-
responsive"/>
<div class="carousel-caption kb_caption kb_caption_center">
<h3 data-animation="animated fadeInLeft">ঢাকাইয়া জামদানি</h3>
<h4 data-animation="animated flipInX">বিশেষ অফার চলছে</h4>
</div>
</div> --}}
</div>
<!-- Left-Button -->
<a class="left carousel-control kb_control_left" href="#kb" role="button" data-
slide="prev">
<span class="fa fa-angle-left kb_icons" aria-
hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<!-- Right-Button -->
<a class="right carousel-control kb_control_right" href="#kb" role="button" data-
slide="next">
<span class="fa fa-angle-right kb_icons" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<script src="js/custom.js"></script>
</div>
<!-- //banner -->
</div>
{{-- End Slider Section --}}
<div class="col-md-3 col-lg-3 col-sm-4 col-xs-12 float-right-style">
<div class="categories-menu mrg-xs">
<div class="category-heading">
<h3> Product Category</h3>
</div>
<div class="category-menu-list">
<ul>
<li><a href="#" class="cat-item">Today's Offer</a></li>
@foreach ($category as $cat)
<?php
$cat_id = $cat->cat_id;
?>
<li><a href="#" class="cat-item"> {{$cat->cat_name}} <i class="zmdi
zmdi-chevron-right"></i></a>
<div class="category-menu-dropdown">
<?php $i = 0; ?>
@foreach ($sub_category as $subCat)
<?php $i++; ?>
<div class="category-part-{{$i}} category-common mb--30">
<?php
$sub_cat_id = $subCat->sub_cat_id;
?>
@if($cat_id == $subCat->cat_id)
<h4 class="categories-subtitle"> {{ $subCat->sub_cat_name}}</h4>
<ul>
{{-- <li><a href="#"> Zamdani Sharee</a></li>
<li><a href="#"> কাতান শাড়ি</a></li>
<li><a href="#"> টাঙ্গাইলী শাড়ি</a></li>
<li><a href="#"> সুতি শাড়ি</a></li> --}}
{{-- <li><a href="#"> Phones & Accessories</a></li> --}}
</ul>
@endif
</div>
@endforeach
</div>
</li>
@endforeach
{{-- <li><a href="#" class="cat-item"> মেয়েদের ফ্যাশন <i class="zmdi
zmdi-chevron-right"></i></a>
<div class="category-menu-dropdown">
<div class="category-part-1 category-common mb--30">
<h4 class="categories-subtitle"> শাড়ি</h4>
<ul>
<li><a href="#"> জামদানি শাড়ি</a></li>
<li><a href="#"> কাতান শাড়ি</a></li>
<li><a href="#"> টাঙ্গাইলী শাড়ি</a></li>
<li><a href="#"> সুতি শাড়ি</a></li>
<li><a href="#"> Phones & Accessories</a></li>
</ul>
</div>
<div class="category-part-2 category-common mb--30">
<h4 class="categories-subtitle"> Jewelry & Watches</h4>
<ul>
<li><a href="#"> Men’s Clothing</a></li>
<li><a href="#"> Computer & Office</a></li>
<li><a href="#"> Jewelry & Watches</a></li>
<li><a href="#"> Bags & Shoes</a></li>
<li><a href="#"> Phones & Accessories</a></li>
</ul>
</div>
<div class="category-part-3 category-common">
<h4 class="categories-subtitle"> Jewelry & Watches</h4>
<ul>
<li><a href="#"> Men’s Clothing</a></li>
<li><a href="#"> Computer & Office</a></li>
<li><a href="#"> Jewelry & Watches</a></li>
<li><a href="#"> Bags & Shoes</a></li>
<li><a href="#"> Phones & Accessories</a></li>
</ul>
</div>
<div class="category-part-4 category-common">
<h4 class="categories-subtitle"> Jewelry & Watches</h4>
<ul>
<li><a href="#"> Men’s Clothing</a></li>
<li><a href="#"> Computer & Office</a></li>
<li><a href="#"> Jewelry & Watches</a></li>
<li><a href="#"> Bags & Shoes</a></li>
<li><a href="#"> Phones & Accessories</a></li>
</ul>
</div>
</div>
</li>
<li><a href="#" class="cat-item"> ছেলেদের ফ্যাশন <i class="zmdi zmdi-
chevron-right"></i></a>
<div class="category-menu-dropdown">
<div class="category-part-1 category-common2 mb--30">
<h4 class="categories-subtitle"> Jewelry & Watches</h4>
<ul>
<li><a href="#"> Men’s Clothing</a></li>
<li><a href="#"> Computer & Office</a></li>
<li><a href="#"> Jewelry & Watches</a></li>
<li><a href="#"> Bags & Shoes</a></li>
<li><a href="#"> Phones & Accessories</a></li>
</ul>
</div>
<div class="category-part-2 category-common2 mb--30">
<h4 class="categories-subtitle"> Jewelry & Watches</h4>
<ul>
<li><a href="#"> Men’s Clothing</a></li>
<li><a href="#"> Computer & Office</a></li>
<li><a href="#"> Jewelry & Watches</a></li>
<li><a href="#"> Bags & Shoes</a></li>
<li><a href="#"> Phones & Accessories</a></li>
</ul>
</div>
<div class="category-part-3 category-common2 mb--30">
<h4 class="categories-subtitle">dress</h4>
<ul>
<li><a href="#"> Men’s Clothing</a></li>
<li><a href="#"> Computer & Office</a></li>
<li><a href="#"> Jewelry & Watches</a></li>
<li><a href="#"> Bags & Shoes</a></li>
<li><a href="#"> Phones & Accessories</a></li>
</ul>
</div>
<div class="mega-banner-img">
<a href="single-product.html">
<img src="images/feature-img/5.jpg" alt="">
</a>
</div>
</div>
</li> --}}
<li><a href="#" class="cat-item">All Products</a></li>
</ul>
</div>
</div>
</div>
<!-- End Left Feature -->
</div>
</div>
</section>
@endsection

Frontend/Product_Details.php -

@extends('frontend/layout/master')
@include('frontend/layout/header')
@section('content')
<!-- Start Product Details -->
<section class="htc__product__details pt--120 pb--100 bg__white">
<div class="container">
<div class="row">
<div class="col-md-6 col-lg-6 col-sm-12 col-xs-12">
<div class="product__details__container">
<!-- Start Small images -->
<ul class="product__small__images" role="tablist">
<li role="presentation" class="pot-small-img active">
<a href="#img-tab-1" role="tab" data-toggle="tab">
<img src="{{URL::to($product->product_image)}}" alt="small-image">
</a>
</li>
{{-- <li role="presentation" class="pot-small-img">
<a href="#img-tab-2" role="tab" data-toggle="tab">
<img src="{{asset('frontend/images/product-details/small-img/2.jpg')}}"
alt="small-image">
</a>
</li> --}}
{{-- <li role="presentation" class="pot-small-img hidden-xs">
<a href="#img-tab-3" role="tab" data-toggle="tab">
<img src="{{asset('frontend/images/product-details/small-img/3.jpg')}}"
alt="small-image">
</a>
</li>
<li role="presentation" class="pot-small-img hidden-xs hidden-sm">
<a href="#img-tab-4" role="tab" data-toggle="tab">
<img src="{{asset('frontend/images/product-details/small-img/2.jpg')}}"
alt="small-image">
</a>
</li> --}}
</ul>
<!-- End Small images -->
<div class="product__big__images">
<div class="portfolio-full-image tab-content">
<div role="tabpanel" class="tab-pane fade in active product-video-position"
id="img-tab-1">
<img src="{{URL::to($product->product_image)}}" alt="full-image">
</div>
{{-- <div role="tabpanel" class="tab-pane fade product-video-position"
id="img-tab-2">
<img src="{{asset('frontend/images/product-details/big-img/12.jpg')}}"
alt="full-image">
<div class="product-video">
<a class="video-popup" href="https://www.youtube.com/watch?
v=cDDWvj_q-o8">
<i class="zmdi zmdi-videocam"></i> View Video
</a>
</div>
</div>
<div role="tabpanel" class="tab-pane fade product-video-position" id="img-
tab-3">
<img src="{{asset('frontend/images/product-details/big-img/11.jpg')}}"
alt="full-image">
<div class="product-video">
<a class="video-popup" href="https://www.youtube.com/watch?
v=cDDWvj_q-o8">
<i class="zmdi zmdi-videocam"></i> View Video
</a>
</div>
</div>
<div role="tabpanel" class="tab-pane fade product-video-position" id="img-
tab-4">
<img src="{{asset('frontend/images/product-details/big-img/12.jpg')}}"
alt="full-image">
<div class="product-video">
<a class="video-popup" href="https://www.youtube.com/watch?
v=cDDWvj_q-o8">
<i class="zmdi zmdi-videocam"></i> View Video
</a>
</div>
</div> --}}
</div>
</div>
</div>
</div>
<div class="col-md-6 col-lg-6 col-sm-12 col-xs-12 smt-30 xmt-30">
<div class="htc__product__details__inner">
<div class="pro__detl__title">
<h2>{{$product->product_name}}</h2>
</div>
<div class="pro__details">
<p>{{$product->product_details}}</p>
</div>
<ul class="pro__dtl__prize">
<li class="old__prize">৳ {{$product->product_price}}</li>
<li>৳ {{$product->product_price - ($product->product_price * $product-
>product_discount /100)}}</li>
</ul>
<div class="pro__dtl__color">
<h2 class="title__5">Choose color-</h2>
<ul class="pro__choose__color">
@foreach (explode(',', $product->product_color) as $color)
<a href="#"><label class="color-tab" style="background-color:
{{ $color }}"></label></a>
@endforeach
</ul>
</div>
<div class="pro__dtl__size">
<h2 class="title__5">Choose size-</h2>
<ul class="pro__choose__size">
@foreach (explode(',', $product->product_size) as $size)
<a href="#">
<span style="margin: 5px" class="label label-default">{{ $size }}</span>
</a>
@endforeach
</ul>
</div>
<div class="product-action-wrap">
<div class="prodict-statas"><span>Qty-</span></div>
<div class="product-quantity">
<form id='myform' method='POST' action="{{route('add2Cart')}}">
{{ csrf_field() }}
<div class="product-quantity">
<div class="cart-plus-minus">
<input class="cart-plus-minus-box" type="text" name="qty"
value="2">
<input type="hidden" name="product_id" value="{{$product-
>product_id}}">
</div>
</div>

</div>
</div>
<ul class="pro__dtl__btn">
<button type="submit" class="btn btn-defalult btn_order">Add to Cart</button>
</form>
@php
$cust_id = Session::get('customer_id');
@endphp
<?php if ($cust_id != NULL ) { ?>
<li class="buy__now__btn"><a href="{{route('checkout')}}">Order
Now</a></li>
<?php }else{ ?>
<li class="buy__now__btn"><a href="{{route('logCk')}}">Order
Now</a></li>
<?php } ?>
</ul>

</div>
</div>
</div>
</div>
</section>
<!-- End Product Details -->
<!-- Start Product tab -->
<section class="htc__product__details__tab bg__white pb--120">
<div class="container">
<div class="row">
<div class="col-md-12 col-lg-12 col-sm-12 col-xs-12">
<ul class="product__deatils__tab mb--60" role="tablist">
<li role="presentation" class="active">
<a href="#description" role="tab" data-toggle="tab">Description</a>
</li>
{{-- <li role="presentation">
<a href="#sheet" role="tab" data-toggle="tab">Data sheet</a>
</li>
<li role="presentation">
<a href="#reviews" role="tab" data-toggle="tab">Reviews</a>
</li> --}}
</ul>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="product__details__tab__content">
<!-- Start Single Content -->
<div role="tabpanel" id="description" class="product__tab__content fade in
active">
<div class="product__description__wrap">
<div class="product__desc">
<h2 class="title__6">Details</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis noexercit
ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
deserunt
mollit anim id.</p>
</div>
<div class="pro__feature">
<h2 class="title__6">Features</h2>
<ul class="feature__list">
<li><a href="#"><i class="zmdi zmdi-play-circle"></i>Duis aute irure
dolor in
reprehenderit in voluptate velit esse</a></li>
<li><a href="#"><i class="zmdi zmdi-play-circle"></i>Irure dolor in
reprehenderit in
voluptate velit esse</a></li>
<li><a href="#"><i class="zmdi zmdi-play-circle"></i>Sed do eiusmod
tempor
incididunt ut labore et </a></li>
<li><a href="#"><i class="zmdi zmdi-play-circle"></i>Nisi ut aliquip
ex ea commodo
consequat.</a></li>
</ul>
</div>
</div>
</div>
<!-- End Single Content -->
<!-- Start Single Content -->
<div role="tabpanel" id="sheet" class="product__tab__content fade">
<div class="pro__feature">
<h2 class="title__6">Data sheet</h2>
<ul class="feature__list">
<li><a href="#"><i class="zmdi zmdi-play-circle"></i>Duis aute irure
dolor in
reprehenderit in voluptate velit esse</a></li>
<li><a href="#"><i class="zmdi zmdi-play-circle"></i>Irure dolor in
reprehenderit in
voluptate velit esse</a></li>
<li><a href="#"><i class="zmdi zmdi-play-circle"></i>Irure dolor in
reprehenderit in
voluptate velit esse</a></li>
<li><a href="#"><i class="zmdi zmdi-play-circle"></i>Sed do eiusmod
tempor incididunt ut
labore et </a></li>
<li><a href="#"><i class="zmdi zmdi-play-circle"></i>Sed do eiusmod
tempor incididunt ut
labore et </a></li>
<li><a href="#"><i class="zmdi zmdi-play-circle"></i>Nisi ut aliquip ex
ea commodo
consequat.</a></li>
<li><a href="#"><i class="zmdi zmdi-play-circle"></i>Nisi ut aliquip ex
ea commodo
consequat.</a></li>
</ul>
</div>
</div>
<!-- End Single Content -->
<!-- Start Single Content -->
<div role="tabpanel" id="reviews" class="product__tab__content fade">
<div class="review__address__inner">
<!-- Start Single Review -->
<div class="pro__review">
<div class="review__thumb">
<img src="images/review/1.jpg" alt="review images">
</div>
<div class="review__details">
<div class="review__info">
<h4><a href="#">Gerald Barnes</a></h4>
<ul class="rating">
<li><i class="zmdi zmdi-star"></i></li>
<li><i class="zmdi zmdi-star"></i></li>
<li><i class="zmdi zmdi-star"></i></li>
<li><i class="zmdi zmdi-star-half"></i></li>
<li><i class="zmdi zmdi-star-half"></i></li>
</ul>
<div class="rating__send">
<a href="#"><i class="zmdi zmdi-mail-reply"></i></a>
<a href="#"><i class="zmdi zmdi-close"></i></a>
</div>
</div>
<div class="review__date">
<span>27 Jun, 2016 at 2:30pm</span>
</div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer
accumsan egestas
elese ifend. Phasellus a felis at estei to bibendum feugiat ut eget eni
Praesent
et messages in con sectetur posuere dolor non.</p>
</div>
</div>
<!-- End Single Review -->
<!-- Start Single Review -->
<div class="pro__review ans">
<div class="review__thumb">
<img src="images/review/2.jpg" alt="review images">
</div>
<div class="review__details">
<div class="review__info">
<h4><a href="#">Gerald Barnes</a></h4>
<ul class="rating">
<li><i class="zmdi zmdi-star"></i></li>
<li><i class="zmdi zmdi-star"></i></li>
<li><i class="zmdi zmdi-star"></i></li>
<li><i class="zmdi zmdi-star-half"></i></li>
<li><i class="zmdi zmdi-star-half"></i></li>
</ul>
<div class="rating__send">
<a href="#"><i class="zmdi zmdi-mail-reply"></i></a>
<a href="#"><i class="zmdi zmdi-close"></i></a>
</div>
</div>
<div class="review__date">
<span>27 Jun, 2016 at 2:30pm</span>
</div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer
accumsan egestas
elese ifend. Phasellus a felis at estei to bibendum feugiat ut eget eni
Praesent
et messages in con sectetur posuere dolor non.</p>
</div>
</div>
<!-- End Single Review -->
</div>
<!-- Start RAting Area -->
<div class="rating__wrap">
<h2 class="rating-title">Write A review</h2>
<h4 class="rating-title-2">Your Rating</h4>
<div class="rating__list">
<!-- Start Single List -->
<ul class="rating">
<li><i class="zmdi zmdi-star-half"></i></li>
</ul>
<!-- End Single List -->
<!-- Start Single List -->
<ul class="rating">
<li><i class="zmdi zmdi-star-half"></i></li>
<li><i class="zmdi zmdi-star-half"></i></li>
</ul>
<!-- End Single List -->
<!-- Start Single List -->
<ul class="rating">
<li><i class="zmdi zmdi-star-half"></i></li>
<li><i class="zmdi zmdi-star-half"></i></li>
<li><i class="zmdi zmdi-star-half"></i></li>
</ul>
<!-- End Single List -->
<!-- Start Single List -->
<ul class="rating">
<li><i class="zmdi zmdi-star-half"></i></li>
<li><i class="zmdi zmdi-star-half"></i></li>
<li><i class="zmdi zmdi-star-half"></i></li>
<li><i class="zmdi zmdi-star-half"></i></li>
</ul>
<!-- End Single List -->
<!-- Start Single List -->
<ul class="rating">
<li><i class="zmdi zmdi-star-half"></i></li>
<li><i class="zmdi zmdi-star-half"></i></li>
<li><i class="zmdi zmdi-star-half"></i></li>
<li><i class="zmdi zmdi-star-half"></i></li>
<li><i class="zmdi zmdi-star-half"></i></li>
</ul>
<!-- End Single List -->
</div>
</div>
<!-- End RAting Area -->
<div class="review__box">
<form id="review-form">
<div class="single-review-form">
<div class="review-box name">
<input type="text" placeholder="Type your name">
<input type="email" placeholder="Type your email">
</div>
</div>
<div class="single-review-form">
<div class="review-box message">
<textarea placeholder="Write your review"></textarea>
</div>
</div>
<div class="review-btn">
<a class="fv-btn" href="#">submit review</a>
</div>
</form>
</div>
</div>
<!-- End Single Content -->
</div>
</div>
</div>
</div>
</section>
<!-- End Product tab -->
@endsection
@include('frontend/layout/footer')

Frontend/Cart.php-

@extends('frontend/layout/master')
@include('frontend/layout/header')
@section('content')
<!-- cart-main-area start -->
<div class="cart-main-area ptb--120 bg__white">
<div class="container">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="table-content table-responsive">
@php
$id = 1;
$contents = Cart::getContent();
@endphp
<table>
<thead>
<tr class="cart-table">
<th style="width: 100px" class="product-serial">#</th>
<th class="product-thumbnail">Image</th>
<th class="product-code">Code</th>
<th class="product-name">Name</th>
<th class="product-price">Price</th>
<th class="product-quantity">Qty</th>
<th class="product-subtotal">Total Price</th>
<th class="product-remove">Remove</th>
</tr>
</thead>
<tbody>
@foreach ($contents as $item)

<tr>
<td class="product-serial"><span class="sl">{{$id++}}</span></td>
<td class="product-thumbnail"><a href="#"><img src="{{$item-
>attributes->image}}" alt="product img" /></a></td>
<td class="product-code"><a href="#">{{$item->attributes-
>product_code}}</a></td>
<td class="product-name"><a href="#">{{$item->name}}</a></td>
<td class="product-price"><span class="amount">৳
{{number_format($item->price)}}</span></td>
<td class="product-quantity">
<form action={{ route('upCart') }} method="POST">
{{ csrf_field() }}
<input type="number" name="quantity" value="{{$item-
>quantity}}" />
<input type="hidden" name="product_id" value="{{$item-
>id}}">
<button type="submit" class="btn btn-success edit-cart"><i
class="fa fa-edit"></i></button>
</form>

</td>
<td class="product-subtotal"> ৳ {{number_format($item-
>getPriceSum())}}</td>
<td class="product-remove">
<a class="btn btn-danger" href="{{route('delCart',
Hashids::encode($item->id))}}"
data-toggle="modal" id="delete">
<i class="fa fa-trash"></i>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="row">
<div class="col-md-8 col-sm-7 col-xs-12">
<div class="buttons-cart">
<a href="{{route('home')}}">Continue Shopping</a>
</div>
<div class="coupon">
<h3>Coupon</h3>
<p>Enter your coupon code if you have one.</p>
<input type="text" placeholder="Coupon code" />
<input type="submit" value="Apply Coupon" />
</div>
</div>
<div class="col-md-4 col-sm-5 col-xs-12">
<div class="cart_totals">
<h2>Price Information</h2>
<table>
<tbody>
@php
$total = 150;
@endphp
<tr class="cart-subtotal">
<th>Total Price</th>
<td>
<input type="hidden" id="amount"
value="{{Cart::getSubTotal()}}">
<span class="amount" id='lblAmount'> ৳
{{number_format(Cart::getSubTotal())}}</span>
</td>
</tr>
<tr class="shipping">
<th>Shipping Charge</th>
<td>
<ul id="shipping_method">
@php
$price = 30;
@endphp
<li>
<input type="radio" class="form-check-input"
name="optradio" checked />
<label class="shipping=method">
Free Delivery &nbsp;&nbsp; <span class="amount">
৳ ০০</span>
</label>
</li>
{{-- <li>
<input type="radio" class="form-check-input"
name="optradio" />
<label>
Home Delivery <span class="amount">৳ {{$numto-
>bnNum($price)}}</span>
</label>
</li> --}}
<li></li>
</ul>
<p><a class="shipping-calculator-button" href="#">Calculate
Shipping</a></p>
</td>
</tr>
<tr class="order-total">
<th>Total</th>
<td>
<strong><span class="amount"> ৳
{{number_format(Cart::getTotal())}}</span></strong>
</td>
</tr>
</tbody>
</table>
<div class="wc-proceed-to-checkout">
@php
$cust_id = Session::get('customer_id');
@endphp
<?php if ($cust_id != NULL ) { ?>
<a href="{{route('checkout')}}">Checkout</a>
<?php }else{ ?>
<a href="{{route('logCk')}}">Checkout</a>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- cart-main-area end -->
@endsection
@include('frontend/layout/footer')

Frontend/Checkout.php-

@extends('frontend/layout/master')
@include('frontend/layout/header')
@section('content')
<!-- Start Checkout Area -->
<section class="our-checkout-area ptb--120 bg__white">
<div class="container">
<div class="row">
<div class="col-md-8 col-lg-8">
<div class="ckeckout-left-sidebar">
<!-- Start Checkbox Area -->
<div class="checkout-form">
<h2 class="section-title-3">Billing details</h2>
<form action="{{route('saveShip')}}" method="POST">
{{ csrf_field() }}
<div class="checkout-form-inner">
<div class="single-checkout-box">
<input type="text" name="fname" placeholder="First Name*">
<input type="text" name="lname" placeholder="Last Name*">
</div>
<div class="single-checkout-box">
<input type="email" name="email" placeholder="Emial*">
<input type="text" name="phone" placeholder="Phone*">
</div>
<div class="single-checkout-box">
<input type="text" name="city" placeholder="City*">
<input type="text" name="zid" placeholder="Zip Code">
</div>
<div class="single-checkout-box">
<textarea name="address" placeholder="Address*"></textarea>
</div>
<div class="single-checkout-box checkbox">
<button class="btn btn-success">Submit</button>
</div>
</div>
</form>
</div>
<!-- End Checkbox Area -->
</div>
</div>
</div>
</div>
</section>
<!-- End Checkout Area -->
@endsection
@include('frontend/layout/footer')

Frontend/Payment.php-

@extends('frontend/layout/master')
@include('frontend/layout/header')
@section('content')
<!-- Start Checkout Area -->
<section class="our-checkout-area ptb--120 bg__white">
<div class="container">
<div class="row">
<div class="col-md-8 col-lg-8">
<div class="ckeckout-left-sidebar">
<!-- Start Checkbox Area -->
<div class="checkout-form">
<h2 class="section-title-3">Payment</h2>
<label for="fname">Accepted Cards</label>
<div class="icon-container">
<i class="fa fa-cc-visa" style="color:navy;"></i>
<i class="fa fa-cc-amex" style="color:blue;"></i>
<i class="fa fa-cc-mastercard" style="color:red;"></i>
<i class="fa fa-cc-discover" style="color:orange;"></i>
</div>
<form action="{{route('order')}}" method="POST">
{{ csrf_field() }}
<div class="checkout-form-inner">
<div class="single-checkout-box">
<input type="text" name="card" placeholder="Card Name*">
</div>
<div class="single-checkout-box">
<input type="text" name="number" placeholder="Card Number*">
</div>
<div class="single-checkout-box checkbox">
<button class="btn btn-success">Submit</button>
</div>
</div>
</form>
</div>
<!-- End Checkbox Area -->
</div>
</div>
</div>
</div>
</section>
<!-- End Checkout Area -->
@endsection
@include('frontend/layout/footer')

Frontend/Login.php-

@extends('frontend/layout/master')
@include('frontend/layout/header')
@section('content')
<div class="class container">
<div class="row">
{{-- <div class="col-md-2"></div> --}}
<div class="col-md-12">
<div class="panel">
<div class="panel-body">
<!-- Start Login Register Area -->
<div class="htc__login__register bg__white ptb--130" style="background: rgba(0, 0, 0,
0) url(images/bg/5.jpg) no-repeat scroll center center / cover ;">
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<ul class="login__register__menu" role="tablist">
<li role="presentation" class="login active"><a href="#login" role="tab"
data-toggle="tab">Login</a></li>
<li role="presentation" class="register"><a href="#register" role="tab" data-
toggle="tab">Registration</a></li>
</ul>
</div>
</div>
<!-- Start Login Register Content -->
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div class="htc__login__register__wrap">
<!-- Start Single Content -->
<div id="login" role="tabpanel" class="single__tabs__panel tab-pane fade in
active">
<form class="login" action="{{route('custLogin')}}" method="POST">
{{ csrf_field() }}
<input type="email" name="email" placeholder="E-mail *">
<input type="password" name="password" placeholder="Password *">
<div class="htc__login__btn mt--30">
<button type="submit" class="btn btn-success
btn_login">Login</button>
</div>
</form><br>
<div class="tabs__checkbox">
<span class="forget"><a href="#">Forgot your password?</a></span>
</div>
<div class="htc__social__connect">
<h2>Or, Login-</h2>
<ul class="htc__soaial__list">
<li><a class="bg--twitter" href="#"><i class="zmdi zmdi-
twitter"></i></a></li>

<li><a class="bg--instagram" href="#"><i class="zmdi zmdi-


instagram"></i></a></li>

<li><a class="bg--facebook" href="#"><i class="zmdi zmdi-


facebook"></i></a></li>

<li><a class="bg--googleplus" href="#"><i class="zmdi zmdi-


google-plus"></i></a></li>
</ul>
</div>
</div>
<!-- End Single Content -->
<!-- Start Single Content -->
<div id="register" role="tabpanel" class="single__tabs__panel tab-pane
fade">
<form class="login" action="{{route('custReg')}}" method="POST">
{{ csrf_field() }}
<input type="text" name="name" placeholder="Full Name *">
<input type="text" name="mobile" placeholder="Mobile *">
<input type="email" name="email" placeholder="E-mail *">
<input type="password" name="password" placeholder="Password *">
<div class="htc__login__btn mt--30">
<button type="submit" class="btn btn-success
btn_login">Registration</button>
</div>
</form><br>
<div class="htc__social__connect">
<h2>Or, Login-</h2>
<ul class="htc__soaial__list">
<li><a class="bg--twitter" href="#"><i class="zmdi zmdi-
twitter"></i></a></li>
<li><a class="bg--instagram" href="#"><i class="zmdi zmdi-
instagram"></i></a></li>
<li><a class="bg--facebook" href="#"><i class="zmdi zmdi-
facebook"></i></a></li>
<li><a class="bg--googleplus" href="#"><i class="zmdi zmdi-
google-plus"></i></a></li>
</ul>
</div>
</div>
<!-- End Single Content -->
</div>
</div>
</div>
<!-- End Login Register Content -->
</div>
</div>
<!-- End Login Register Area -->
</div>
</div>
</div>
{{-- <div class="col-md-2"></div> --}}
</div>
</div>
@endsection
@include('frontend/layout/footer')

Frontend/Order_list.php-

@extends('frontend/layout/master')
@include('frontend/layout/header')
@section('content')
<div class="cart-main-area ptb--120 bg__white">
<div class="container">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<h2>My Orders</h2>
<div class="table-content table-responsive">
<table>
<thead>
<tr class="cart-table">
<th style="width: 100px" class="product-serial">#</th>
<th class="product-thumbnail">Image</th>
<th class="product-code">Code</th>
<th class="product-name">Name</th>
<th class="product-price">Price</th>
<th class="product-quantity">Qty</th>
<th class="product-subtotal">Date</th>
</tr>
</thead>
<tbody>
<?php
$id = 1;
?>
@foreach ($result as $item)
<tr>
<td class="product-serial">{{$id++}}</td>
<td class="product-thumbnail"><img src="{{$item-
>product_image}}" alt="product img" /></td>
<td class="product-serial">{{$item->product_code}}</td>
<td class="product-serial">{{$item->product_name}}</td>
<td class="product-serial">{{$item->qty}}</td>
<td class="product-serial">{{$item->product_price}}</td>
<td class="product-serial">{{$item->updated_at}}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- cart-main-area end -->
@endsection
@include('frontend/layout/footer')

Backend/Master.php-

<!doctype html>
<html lang="en">

<head>
<title>Dashboard |Reza Mart:: Online Shopping.</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-
scale=1.0, user-scalable=0">
<!-- VENDOR CSS -->
<link rel="stylesheet"
href="{{asset('backend/vendor/bootstrap/css/bootstrap.min.css')}}">
<link rel="stylesheet" href="{{asset('backend/vendor/font-awesome/css/font-
awesome.min.css')}}">
<link rel="stylesheet" href="{{asset('backend/vendor/linearicons/style.css')}}">
<link rel="stylesheet" href="{{asset('backend/vendor/chartist/css/chartist-
custom.css')}}">
<!-- MAIN CSS -->
<link rel="stylesheet" href="{{asset('backend/css/main.css')}}">
<!-- FOR DEMO PURPOSES ONLY. You should remove this in your project -->
<link rel="stylesheet" href="{{asset('backend/css/demo.css')}}">
{{-- Custom CSS --}}
<link rel="stylesheet" href="{{asset('backend/css/custom.css')}}">
{{-- Toastr --}}
<link rel="stylesheet" href="{{asset('backend/css/toastr.min.css')}}">
<link rel="stylesheet" href="{{asset('backend/css/responsive_datatable.min.css')}}">
<link rel="stylesheet" href="{{asset('backend/css/datatable.min.css')}}">
<!-- GOOGLE FONTS -->
<link href="https://fonts.googleapis.com/css?
family=Source+Sans+Pro:300,400,600,700" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-
select/1.8.1/css/bootstrap-select.css">
<!-- ICONS -->
<link rel="apple-touch-icon" sizes="76x76" href="{{asset('backend/img/apple-
icon.png')}}">
<link rel="icon" type="image/png" sizes="96x96"
href="{{asset('backend/img/favicon.png')}}">
</head>

<body>
<!-- WRAPPER -->
<div id="wrapper">
<!-- NAVBAR -->
@yield('navbar')
<!-- END NAVBAR -->
<!-- LEFT SIDEBAR -->
@yield('sidebar')
<!-- END LEFT SIDEBAR -->
<!-- MAIN -->
<div class="main">
<!-- MAIN CONTENT -->
@yield('content')
<!-- END MAIN CONTENT -->
</div>
<!-- END MAIN -->
<div class="clearfix"></div>
@yield('footer')
</div>
<!-- END WRAPPER -->
<!-- Javascript -->
<script src="{{asset('backend/vendor/jquery/jquery.min.js')}}"></script>
<script src="{{asset('backend/vendor/bootstrap/js/bootstrap.min.js')}}"></script>
<script src="{{asset('backend/vendor/jquery-
slimscroll/jquery.slimscroll.min.js')}}"></script>
<script src="{{asset('backend/vendor/jquery.easy-pie-
chart/jquery.easypiechart.min.js')}}"></script>
<script src="{{asset('backend/vendor/chartist/js/chartist.min.js')}}"></script>
<script src="{{asset('backend/scripts/klorofil-common.js')}}"></script>
<script src="{{asset('backend/scripts/toastr.min.js')}}"></script>

<script src="{{asset('backend/scripts/jquery-3.5.1.js')}}"></script>
<script src="{{asset('backend/scripts/dataTables.min.js')}}"></script>
<script src="{{asset('backend/scripts/dataTables.bootstrap4.min.js')}}"></script>
<script src="{{asset('backend/scripts/responsive.bootstrap4.min.js')}}"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.8.1/js/bootstrap-
select.js"></script>
<script>
$(document).ready(function() {
$('#example').DataTable();
} );
</script>
<script>
$(function() {
var data, options;

// headline charts
data = {
labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
series: [
[23, 29, 24, 40, 25, 24, 35],
[14, 25, 18, 34, 29, 38, 44],
]
};

options = {
height: 300,
showArea: true,
showLine: false,
showPoint: false,
fullWidth: true,
axisX: {
showGrid: false
},
lineSmooth: false,
};

new Chartist.Line('#headline-chart', data, options);

// visits trend charts


data = {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct',
'Nov', 'Dec'],
series: [{
name: 'series-real',
data: [200, 380, 350, 320, 410, 450, 570, 400, 555, 620, 750,
900],
}, {
name: 'series-projection',
data: [240, 350, 360, 380, 400, 450, 480, 523, 555, 600, 700,
800],
}]
};

options = {
fullWidth: true,
lineSmooth: false,
height: "270px",
low: 0,
high: 'auto',
series: {
'series-projection': {
showArea: true,
showPoint: false,
showLine: false
},
},
axisX: {
showGrid: false,

},
axisY: {
showGrid: false,
onlyInteger: true,
offset: 0,
},
chartPadding: {
left: 20,
right: 20
}
};

new Chartist.Line('#visits-trends-chart', data, options);

// visits chart
data = {
labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
series: [
[6384, 6342, 5437, 2764, 3958, 5068, 7654]
]
};

options = {
height: 300,
axisX: {
showGrid: false
},
};

new Chartist.Bar('#visits-chart', data, options);

// real-time pie chart


var sysLoad = $('#system-load').easyPieChart({
size: 130,
barColor: function(percent) {
return "rgb(" + Math.round(200 * percent / 100) + ", " +
Math.round(200 * (1.1 - percent / 100)) + ", 0)";
},
trackColor: 'rgba(245, 245, 245, 0.8)',
scaleColor: false,
lineWidth: 5,
lineCap: "square",
animate: 800
});

var updateInterval = 3000; // in milliseconds

setInterval(function() {
var randomVal;
randomVal = getRandomInt(0, 100);

sysLoad.data('easyPieChart').update(randomVal);
sysLoad.find('.percent').text(randomVal);
}, updateInterval);

function getRandomInt(min, max) {


return Math.floor(Math.random() * (max - min + 1)) + min;
}

});
</script>
<script>

@if (Session::has('message'))
var type = "{{ Session::get('alert-type', 'info') }}"
switch(type){
case 'info':

toastr.options.timeOut = 10000;
toastr.info("{{Session::get('message')}}");
var audio = new Audio('audio.mp3');
audio.play();
break;
case 'success':

toastr.options.timeOut = 10000;
toastr.success("{{Session::get('message')}}");
var audio = new Audio('audio.mp3');
audio.play();

break;
case 'warning':

toastr.options.timeOut = 10000;
toastr.warning("{{Session::get('message')}}");
var audio = new Audio('audio.mp3');
audio.play();

break;
case 'error':

toastr.options.timeOut = 10000;
toastr.error("{{Session::get('message')}}");
var audio = new Audio('audio.mp3');
audio.play();

break;
}
@endif
</script>
</body>

</html>

Backend/Login.php-

<!doctype html>
<html lang="en" class="fullscreen-bg">

<head>
<title>Dashboard |Reza Mart:: Online Shopping.</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-
scale=1.0, user-scalable=0">
<!-- VENDOR CSS -->
<link rel="stylesheet"
href="{{asset('backend/vendor/bootstrap/css/bootstrap.min.css')}}">
<link rel="stylesheet" href="{{asset('backend/vendor/font-awesome/css/font-
awesome.min.css')}}">
<link rel="stylesheet" href="{{asset('backend/vendor/linearicons/style.css')}}">
<link rel="stylesheet" href="{{asset('backend/vendor/chartist/css/chartist-
custom.css')}}">
<!-- MAIN CSS -->
<link rel="stylesheet" href="{{asset('backend/css/main.css')}}">
<!-- FOR DEMO PURPOSES ONLY. You should remove this in your project -->
<link rel="stylesheet" href="{{asset('backend/css/demo.css')}}">
{{-- Custom CSS --}}
<link rel="stylesheet" href="{{asset('backend/css/custom.css')}}">
{{-- Toastr --}}
<link rel="stylesheet" href="{{asset('backend/css/toastr.min.css')}}">
<link rel="stylesheet" href="{{asset('backend/css/responsive_datatable.min.css')}}">
<link rel="stylesheet" href="{{asset('backend/css/datatable.min.css')}}">
<!-- GOOGLE FONTS -->
<link href="https://fonts.googleapis.com/css?
family=Source+Sans+Pro:300,400,600,700" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-
select/1.8.1/css/bootstrap-select.css">
<!-- ICONS -->
<link rel="apple-touch-icon" sizes="76x76" href="{{asset('backend/img/apple-
icon.png')}}">
<link rel="icon" type="image/png" sizes="96x96"
href="{{asset('backend/img/favicon.png')}}">
</head>

<body>
<!-- WRAPPER -->
<div id="wrapper">
<div class="vertical-align-wrap">
<div class="vertical-align-middle">
<div class="col col-md-4"></div>
<div class="col col-md-4">
<div class="content">
<div class="header">
<p class="lead">Login to your
account</p>
</div>
<form class="form-auth-small"
method="POST" action="{{route('logCheck')}}">
{{ csrf_field() }}
<div class="form-group">
<label for="signin-email"
class="control-label sr-only">Email</label>
<input type="email"
class="form-control" id="signin-email" name="email" placeholder="Email" required>
</div>
<div class="form-group">
<label for="signin-
password" class="control-label sr-only">Password</label>
<input type="password"
class="form-control" id="signin-password" name="password" placeholder="Password"
required>
</div>
<div class="form-group clearfix">
<label class="fancy-
checkbox element-left">
<input
type="checkbox">
<span>Remember
me</span>
</label>
</div>
<button type="submit" class="btn
btn-primary btn-lg btn-block">LOGIN</button>
<div class="bottom">
<span class="helper-
text"><a href="#">Registration</a></span>
</div>
</form>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
<!-- END WRAPPER -->

</body>

</html>

Backend/Dashboard.php-

@extends('backend/layout/master')
@include('backend/layout/header')
@include('backend/layout/navbar')
@include('backend/layout/sidebar')
@section('content')
<div class="main-content">
<div class="container-fluid">
<!-- OVERVIEW -->
<div class="panel panel-headline">
<div class="panel-heading">
<h3 class="panel-title">Weekly Overview</h3>
<p class="panel-subtitle">Period: Oct 14, 2016 - Oct 21, 2016</p>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-3">
<div class="metric">
<span class="icon"><i class="fa fa-download"></i></span>
<p>
<span class="number">10</span>
<span class="title">Orders</span>
</p>
</div>
</div>
<div class="col-md-3">
<div class="metric">
<span class="icon"><i class="fa fa-shopping-bag"></i></span>
<p>
<span class="number">10</span>
<span class="title">Sales</span>
</p>
</div>
</div>
<div class="col-md-3">
<div class="metric">
<span class="icon"><i class="fa fa-eye"></i></span>
<p>
<span class="number">10</span>
<span class="title">Visits</span>
</p>
</div>
</div>
<div class="col-md-3">
<div class="metric">
<span class="icon"><i class="fa fa-bar-chart"></i></span>
<p>
<span class="number">35%</span>
<span class="title">Conversions</span>
</p>
</div>
</div>
</div>
<!-- END OVERVIEW -->
<div class="row">
<!-- RECENT PURCHASES -->
<div class="panel">
<div class="panel-heading">
<h3 class="panel-title">Recent Order</h3>
<div class="right">
<button type="button" class="btn-toggle-collapse"><i class="lnr lnr-chevron-
up"></i></button>
<button type="button" class="btn-remove"><i class="lnr lnr-
cross"></i></button>
</div>
</div>
<div class="panel-body no-padding">
<table class="table table-striped">
<thead>
<tr>
<th>SL</th>
<th>Customer Name</th>
<th>Quantity</th>
<th>price</th>
<th>Status</th>
<th>Date &amp; Time</th>
</tr>
</thead>
<tbody>
<?php
$id = 1;
?>
@foreach ($result as $item)
<tr>
<td><a href="#">{{ $id++ }}</a></td>
<td>{{$item->customer_name}}</td>
<td>{{$item->order_total}}</td>
<td></td>
@if ($item->status == 0)
<td><span class="label label-primary">Pending</span></td>
@else
<td><span class="label label-success">Delivered</span></td>
@endif
<td>{{$item->updated_at}}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="panel-footer">
<div class="row">
<div class="col-md-6"><span class="panel-note"><i class="fa fa-clock-
o"></i> Last 24 hours</span></div>
<div class="col-md-6 text-right"><a href="#" class="btn btn-primary">View
All Purchases</a></div>
</div>
</div>
</div>
<!-- END RECENT PURCHASES -->
</div>
</div>
</div>

</div>
</div>
</div>
@endsection
@include('backend/layout/footer')

Backend/Add_Slier.php-

@extends('backend/layout/master')
@include('backend/layout/header')
@include('backend/layout/navbar')
@include('backend/layout/sidebar')
@section('content')
<!-- INPUT SIZING -->
<div class="row">
<div class="col-md-6">
<div class="panel">
<div class="panel-heading">
<h3 class="panel-title"> <i class="lnr lnr-plus-circle"></i> Add New Slider</h3>
</div>
<div class="panel-body">
<form method="post" action="{{route('addSlider')}}" enctype="multipart/form-
data">
{{ csrf_field() }}
<div class="form-group">
<label for="title">Title<span class="star">*</span></label>
<input class="form-control" name="title" placeholder="Title input" type="text"
required>
</div>
<div class="form-group">
<label for="sub-title">Sub-Title<span class="star">*</span></label>
<input class="form-control"name="sub_title" placeholder="Sub-Title input"
type="text" required>
</div>
<div class="form-group">
<label for="title-position">Title Position<span class="star">*</span></label>
<select class="form-control" name="position" required>
<option value="">Choose</option>
<option value="kb_caption_right">Right</option>
<option value="kb_caption_center">Center</option>
<option value="kb_caption_left">Left</option>
</select>
</div>
<div class="form-group">
<label for="product-code">Product Code<span class="star">*</span></label>
<input class="form-control" placeholder="Product Code input"
name="product_code" type="text" required>
</div>
<div class="form-group">
<label for="slider-image">Slider Image<span class="star">*</span></label>
<div class="custom-file">
<input type="file" class="custom-file-input" name="image" id="customFile"
required>
</div>
</div>
<div class="form-group">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="1" name="status"
id="defaultCheck1">
<label class="form-check-label" for="defaultCheck1">
Status
</label>
</div>
</div>
<button type="submit" class="btn btn-primary"><i class="fa fa-plus-square"></i>
Submit</button>
</form>
</div>
</div>
<!-- END INPUT SIZING -->
</div>
</div>
@endsection
@include('backend/layout/footer')

Backend/View_Slider.php-

@extends('backend/layout/master')
@include('backend/layout/header')
@include('backend/layout/navbar')
@include('backend/layout/sidebar')
@section('content')
<div class="row">
<div class="panel panel-headline">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-list"></i> Slider Information</h3>
</div>
<div class="panel-body">
<table id="example" class="table table-striped table-bordered dt-responsive nowrap"
style="width:100%">
<thead>
<tr>
<th>SL</th>
<th>Image</th>
<th>Title</th>
<th>Sub Title</th>
<th>Title Position</th>
<th>Product Code</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@php
$i = 0;
@endphp
@foreach($slider as $slider)
@php
$i++;
@endphp
<tr>
<td>{{ $i }}</td>
<td><img src="{{URL::to($slider->image)}}" style="height: 100px; width:
100px"></td>
<td>{{$slider->title}}</td>
<td>{{$slider->sub_title}}</td>
@if ($slider->position = 'kb_caption_right')
<td>Right</td>
@elseif($slider->position = 'kb_caption_center')
<td>Center</td>
@else
<td>Left</td>
@endif

<td>{{$slider->product_code}}</td>
@if ($slider->status == 1)
<td><span class="label label-success">Active</span></td>
@else
<td><span class="label label-default">Active</span></td>
@endif
<td>
@if($slider->status == 1)
<a class="btn btn-default" href="{{route('inActive', $slider->slider_id)}}">
<i class="fa fa-thumbs-down"></i>
</a>
@else
<a class="btn btn-success" href="{{route('active', $slider->slider_id)}}">
<i class="fa fa-thumbs-up"></i>
</a>
@endif
<a class="btn btn-info" href="{{route('editSlider', $slider->slider_id)}}">
<i class="fa fa-edit"></i>
</a>
<a class="btn btn-danger" href="#deleteModal{{$slider->slider_id}}" data-
toggle="modal" id="delete">
<i class="fa fa-trash"></i>
</a>
<!-- Modal -->
<div class="modal fade" id="deleteModal{{$slider->slider_id}}" tabindex="-1"
aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Confirmation</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<h4>Do you really want to delete?</h4>
<form action="{{route('delete', $slider->slider_id)}}" method="post">
{{ csrf_field() }}

</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-
dismiss="modal">Close</button>
<button type="submit" class="btn btn-danger">Delete</button>
</div>
</form>
</div>
</div>
</div>
{{-- End Modal --}}

</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@endsection
@include('backend/layout/footer')

Backend/Edit_Slider.php-

@extends('backend/layout/master')
@include('backend/layout/header')
@include('backend/layout/navbar')
@include('backend/layout/sidebar')
@section('content')
<!-- INPUT SIZING -->
<div class="row">
<div class="col-md-6">
<div class="panel">
<div class="panel-heading">
<h3 class="panel-title"> <i class="fa fa-edit"></i> Edit Slider</h3>
</div>
<div class="panel-body">
<form method="post" action="{{route('updateSlider', $slider->slider_id)}}"
enctype="multipart/form-data">
{{ csrf_field() }}
<div class="form-group">
<label for="title">Title<span class="star">*</span></label>
<input class="form-control" name="title" value="{{$slider->title}}" type="text"
required>
</div>
<div class="form-group">
<label for="sub-title">Sub-Title<span class="star">*</span></label>
<input class="form-control"name="sub_title" value="{{$slider->sub_title}}"
type="text" required>
</div>
<div class="form-group">
<label for="title-position">Title Position<span class="star">*</span></label>
<select class="form-control" name="position" required>
@if ($slider->position == "kb_caption_right")
<option value="kb_caption_right" selected>Right</option>
@elseif ($slider->position == "kb_caption_center")
<option value="kb_caption_center">Center</option>
@else
<option value="kb_caption_left">Left</option>
@endif
</select>
</div>
<div class="form-group">
<label for="product-code">Product Code<span class="star">*</span></label>
<input class="form-control" value="{{$slider->product_code}}"
name="product_code" type="text" required>
</div>
<div class="form-group">
<label for="slider-image">Slider Image</label>
<div class="custom-file">
<input type="file" class="custom-file-input" name="image"
id="customFile">
</div>
</div>
<div class="form-group">
<div class="form-check">
@if ($slider->status == 1)
<input class="form-check-input" type="checkbox" value="1" name="status"
id="defaultCheck1" checked>
@else
<input class="form-check-input" type="checkbox" value="1" name="status"
id="defaultCheck1">
@endif
<label class="form-check-label" for="defaultCheck1">
Status
</label>
</div>
</div>
<button type="submit" class="btn btn-primary"><i class="fa fa-edit"></i>
Update</button>
</form>
</div>
</div>
<!-- END INPUT SIZING -->
</div>
</div>
@endsection
@include('backend/layout/footer')

Backend/Add_Category.php-

@extends('backend/layout/master')
@include('backend/layout/header')
@include('backend/layout/navbar')
@include('backend/layout/sidebar')
@section('content')
<!-- INPUT SIZING -->
<div class="row">
<div class="col-md-6">
<div class="panel">
<div class="panel-heading">
<h3 class="panel-title"> <i class="lnr lnr-plus-circle"></i> Add New
Category</h3>
</div>
<div class="panel-body">
<form method="post" action="{{route('storeCat')}}" enctype="multipart/form-
data">
{{ csrf_field() }}
<div class="form-group">
<label for="title">Category Name:<span class="star">*</span></label>
<input class="form-control" name="cat_name" placeholder="Category name
input" type="text" required>
</div>
<div class="form-group">
<label for="sub-title">Category Details:</label>
<textarea class="form-control" name="cat_details" placeholder="Category
details input" rows="4"></textarea>
</div>
<div class="form-group">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="1" name="status"
id="defaultCheck1">
<label class="form-check-label" for="defaultCheck1">
Status
</label>
</div>
</div>
<button type="submit" class="btn btn-primary"><i class="fa fa-plus-square"></i>
Submit</button>
</form>
</div>
</div>
<!-- END INPUT SIZING -->
</div>
</div>
@endsection
@include('backend/layout/footer')

Backend/View_Category.php-

@extends('backend/layout/master')
@include('backend/layout/header')
@include('backend/layout/navbar')
@include('backend/layout/sidebar')
@section('content')
<div class="row">
<div class="panel panel-headline">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-list"></i> Category Information</h3>
</div>
<div class="panel-body">
<table id="example" class="table table-striped table-bordered dt-responsive nowrap"
style="width:100%">
<thead>
<tr>
<th>SL</th>
<th>Category Name</th>
<th>Category Details</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@php
$i = 0;
@endphp
@foreach($category as $cat)
@php
$i++;
@endphp
<tr>
<td>{{ $i }}</td>
<td>{{$cat->cat_name}}</td>
<td>{{$cat->cat_details}}</td>
@if ($cat->status == 1)
<td><span class="label label-success">Active</span></td>
@else
<td><span class="label label-default">Active</span></td>
@endif
<td>
@if($cat->status == 1)
<a class="btn btn-default" href="{{route('catInAc', $cat->cat_id)}}">
<i class="fa fa-thumbs-down"></i>
</a>
@else
<a class="btn btn-success" href="{{route('catAc', $cat->cat_id)}}">
<i class="fa fa-thumbs-up"></i>
</a>
@endif
<a class="btn btn-info" href="{{route('editCat', $cat->cat_id)}}">
<i class="fa fa-edit"></i>
</a>
<a class="btn btn-danger" href="#deleteModal{{$cat->cat_id}}" data-
toggle="modal" id="delete">
<i class="fa fa-trash"></i>
</a>
<!-- Modal -->
<div class="modal fade" id="deleteModal{{$cat->cat_id}}" tabindex="-1" aria-
labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Confirmation</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<h4>Do you really want to delete?</h4>
<form action="{{route('catDel', $cat->cat_id)}}" method="post">
{{ csrf_field() }}

</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-
dismiss="modal">Close</button>
<button type="submit" class="btn btn-danger">Delete</button>
</div>
</form>
</div>
</div>
</div>
{{-- End Modal --}}

</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@endsection
@include('backend/layout/footer')

Backend/Edit_Category.php-

@extends('backend/layout/master')
@include('backend/layout/header')
@include('backend/layout/navbar')
@include('backend/layout/sidebar')
@section('content')
<!-- INPUT SIZING -->
<div class="row">
<div class="col-md-6">
<div class="panel">
<div class="panel-heading">
<h3 class="panel-title"> <i class="fa fa-edit"></i> Edit Category</h3>
</div>
<div class="panel-body">
<form method="post" action="{{route('catUp', $cat->cat_id)}}"
enctype="multipart/form-data">
{{ csrf_field() }}
<div class="form-group">
<label for="title">Category Name:<span class="star">*</span></label>
<input class="form-control" name="cat_name" value="{{$cat->cat_name}}"
type="text" required>
</div>
<div class="form-group">
<label for="sub-title">Category Details:</label>
<textarea class="form-control" name="cat_details" rows="4">{{$cat-
>cat_details}}</textarea>
</div>
<div class="form-group">
<div class="form-check">
@if ($cat->status == 1)
<input class="form-check-input" type="checkbox" value="1" name="status"
id="defaultCheck1" checked>
@else
<input class="form-check-input" type="checkbox" value="1" name="status"
id="defaultCheck1">
@endif
<label class="form-check-label" for="defaultCheck1">
Status
</label>
</div>
</div>
<button type="submit" class="btn btn-primary"><i class="fa fa-edit"></i>
Update</button>
</form>
</div>
</div>
<!-- END INPUT SIZING -->
</div>
</div>
@endsection
@include('backend/layout/footer')
Backend/Add_Sub_Category.php-

@extends('backend/layout/master')
@include('backend/layout/header')
@include('backend/layout/navbar')
@include('backend/layout/sidebar')
@section('content')
<!-- INPUT SIZING -->
<div class="row">
<div class="col-md-6">
<div class="panel">
<div class="panel-heading">
<h3 class="panel-title"> <i class="lnr lnr-plus-circle"></i> Add Sub-Category</h3>
</div>
<div class="panel-body">
<form method="post" action="{{route('storeSubCat')}}" enctype="multipart/form-
data">
{{ csrf_field() }}
<?php
$selectBoxCat = DB::table('categories')
->where('status', 1)
->get();
?>

<div class="form-group">
<label for="title-position">Category Name:<span
class="star">*</span></label>
<select class="form-control" name="cat_id" required>
<option value="">Choose</option>
@foreach($selectBoxCat as $select)
<option value="{{$select->cat_id}}">{{$select->cat_name}}</option>
@endforeach
</select>
</div>
<div class="form-group">
<label for="title">Sub-Category Name:<span class="star">*</span></label>
<input class="form-control" name="sub_cat_name" placeholder="Category
name input" type="text" required>
</div>
<div class="form-group">
<label for="sub-title">Sub-Category Details:</label>
<textarea class="form-control" name="sub_cat_details" placeholder="Category
details input" rows="4"></textarea>
</div>
<div class="form-group">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="1" name="status"
id="defaultCheck1">
<label class="form-check-label" for="defaultCheck1">
Status
</label>
</div>
</div>
<button type="submit" class="btn btn-primary"><i class="fa fa-plus-square"></i>
Submit</button>
</form>
</div>
</div>
<!-- END INPUT SIZING -->
</div>
</div>
@endsection
@include('backend/layout/footer')

Backend/View_Sub_Category.php-

@extends('backend/layout/master')
@include('backend/layout/header')
@include('backend/layout/navbar')
@include('backend/layout/sidebar')
@section('content')
<div class="row">
<div class="panel panel-headline">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-list"></i> Category Information</h3>
</div>
<div class="panel-body">
<table id="example" class="table table-striped table-bordered dt-responsive nowrap"
style="width:100%">
<thead>
<tr>
<th>SL</th>
<th>Sub-Category Name</th>
<th>Sub-Category Details</th>
<th>Category Name</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@php
$i = 0;
@endphp
@foreach($subCategory as $subCat)
@php
$i++;
@endphp
<tr>
<td>{{ $i }}</td>
<td>{{$subCat->sub_cat_name}}</td>
<td>{{$subCat->sub_cat_details}}</td>
<td>{{$subCat->cat_name}}</td>
@if ($subCat->status == 1)
<td><span class="label label-success">Active</span></td>
@else
<td><span class="label label-default">Active</span></td>
@endif
<td>
@if($subCat->status == 1)
<a class="btn btn-default" href="{{route('subCatInAc', $subCat-
>sub_cat_id)}}">
<i class="fa fa-thumbs-down"></i>
</a>
@else
<a class="btn btn-success" href="{{route('subCatAc', $subCat->sub_cat_id)}}">
<i class="fa fa-thumbs-up"></i>
</a>
@endif
<a class="btn btn-info" href="{{route('editSubCat', $subCat->sub_cat_id)}}">
<i class="fa fa-edit"></i>
</a>
<a class="btn btn-danger" href="#deleteModal{{$subCat->sub_cat_id}}" data-
toggle="modal" id="delete">
<i class="fa fa-trash"></i>
</a>
<!-- Modal -->
<div class="modal fade" id="deleteModal{{$subCat->sub_cat_id}}" tabindex="-1"
aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Confirmation</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<h4>Do you really want to delete?</h4>
<form action="{{route('subCatDel', $subCat->sub_cat_id)}}" method="post">
{{ csrf_field() }}

</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-
dismiss="modal">Close</button>
<button type="submit" class="btn btn-danger">Delete</button>
</div>
</form>
</div>
</div>
</div>
{{-- End Modal --}}

</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@endsection
@include('backend/layout/footer')

Backend/Edit_Sub_Category.php-

@extends('backend/layout/master')
@include('backend/layout/header')
@include('backend/layout/navbar')
@include('backend/layout/sidebar')
@section('content')
<!-- INPUT SIZING -->
<div class="row">
<div class="col-md-6">
<div class="panel">
<div class="panel-heading">
<h3 class="panel-title"> <i class="fa fa-edit"></i> Edit Sub-Category</h3>
</div>
<div class="panel-body">
<form method="post" action="{{route('subCatUp', $subCat->sub_cat_id)}}"
enctype="multipart/form-data">
{{ csrf_field() }}

<?php
$id = $subCat->cat_id;
$selectBoxCat = DB::table('categories')
->where('status', 1)
->get();
?>

<div class="form-group">
<label for="title-position">Category Name:<span
class="star">*</span></label>
<select class="form-control" name="cat_id" required>
<option value="">Choose</option>
@foreach($selectBoxCat as $select)
@if ($select->cat_id == $id)
<option value="{{$select->cat_id}}" selected>{{$select-
>cat_name}}</option>
@endif
<option value="{{$select->cat_id}}">{{$select->cat_name}}</option>
@endforeach
</select>
</div>
<div class="form-group">
<label for="title">Sub-Category Name:<span class="star">*</span></label>
<input class="form-control" name="sub_cat_name" value="{{$subCat-
>sub_cat_name}}" type="text" required>
</div>
<div class="form-group">
<label for="sub-title">Sub-Category Details:</label>
<textarea class="form-control" name="sub_cat_details" rows="4">{{$subCat-
>sub_cat_details}}</textarea>
</div>
<div class="form-group">
<div class="form-check">
@if ($subCat->status == 1)
<input class="form-check-input" type="checkbox" value="1" name="status"
id="defaultCheck1" checked>
@else
<input class="form-check-input" type="checkbox" value="1" name="status"
id="defaultCheck1">
@endif
<label class="form-check-label" for="defaultCheck1">
Status
</label>
</div>
</div>
<button type="submit" class="btn btn-primary"><i class="fa fa-edit"></i>
Update</button>
</form>
</div>
</div>
<!-- END INPUT SIZING -->
</div>
</div>
@endsection
@include('backend/layout/footer')
Backend/Add_Sub_Category_Item.php-

@extends('backend/layout/master')
@include('backend/layout/header')
@include('backend/layout/navbar')
@include('backend/layout/sidebar')
@section('content')
<!-- INPUT SIZING -->
<div class="row">
<div class="col-md-6">
<div class="panel">
<div class="panel-heading">
<h3 class="panel-title"> <i class="lnr lnr-plus-circle"></i> Add Sub-Category
Item</h3>
</div>
<div class="panel-body">
<form method="post" action="{{route('storeSubCatItem')}}"
enctype="multipart/form-data">
{{ csrf_field() }}
<div class="form-group">
<label for="title-position">Category Name:<span
class="star">*</span></label>
<select class="form-control" id ="cat_list" name="cat_list"
onchange="myFunction(this.value);">
<option value="">Choose</option>
@foreach($category as $cat)
<option value="{{$cat->cat_id}}">{{$cat->cat_name}}</option>
@endforeach
</select>
</div>

<div class="form-group" id="sdiv">


<label for="title-position">Sub-Category Name:<span
class="star">*</span></label>
<select class="form-control" id="sub_category" name="sub_category">
<option value="">Select category first</option>
</select>
<div class="col-md-3 mb-3" id="simg" style=" display: none">
<img style="margin-top: 30px; margin-left: 30%"
src="{{asset('backend/img/spinner-mini.gif')}}" alt="">
</div>

</div>

<div class="form-group">
<label for="title">Sub-Category Item Name:<span
class="star">*</span></label>
<input class="form-control" name="sub_cat_item_name"
placeholder="Category name input" type="text" required>
</div>
<div class="form-group">
<label for="sub-title">Sub-Category Item Details:</label>
<textarea class="form-control" name="sub_cat_item_details"
placeholder="Category details input" rows="4"></textarea>
</div>
<div class="form-group">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="1" name="status"
id="defaultCheck1">
<label class="form-check-label" for="defaultCheck1">
Status
</label>
</div>
</div>
<button type="submit" class="btn btn-primary"><i class="fa fa-plus-square"></i>
Submit</button>
</form>
</div>
</div>
<!-- END INPUT SIZING -->
</div>
</div>
{{-- Sub-Category Item --}}
<script type="text/javascript">
function myFunction(value)
{
var cat_id = value;
console.log(cat_id);
$.ajax({
type: 'POST',
url: '{{route("findSub")}}',
data: {
cat_id: cat_id,
"_token": "{{ csrf_token() }}",
},
datatype: 'JSON',
beforeSend: function(){
$('#sdiv').hide();
$('#simg').show();
},
success:function(data){
$('#simg').hide();
$('#sdiv').show();
var select = $('select[name=sub_category]');
select.empty();
select.append('<option value="0" >Please Select Sub Category</option>');
$.each(data,function(key, value) {
select.append('<option value=' + value.sub_cat_id + '>' +
value.sub_cat_name + '</option>');
});
}
// div.find('#sub_category').html(" ");
// div.find('#sub_category').append(op);
// $('#simg').hide();
// $('#sdiv').show();
});
}
</script>
@endsection
@include('backend/layout/footer')

Backend/View_Sub_Category_Item.php-

@extends('backend/layout/master')
@include('backend/layout/header')
@include('backend/layout/navbar')
@include('backend/layout/sidebar')
@section('content')
<div class="row">
<div class="panel panel-headline">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-list"></i> Category Information</h3>
</div>
<div class="panel-body">
<table id="example" class="table table-striped table-bordered dt-responsive nowrap"
style="width:100%">
<thead>
<tr>
<th>SL</th>
<th>Item Name</th>
<th>Item Details</th>
<th>Category Name</th>
<th>Sub-Category Name</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@php
$i = 0;
@endphp
@foreach($subCategoryItem as $subCatItem)
@php
$i++;
@endphp
<tr>
<td>{{ $i }}</td>
<td>{{$subCatItem->sub_cat_item_name}}</td>
<td>{{$subCatItem->sub_cat_item_details}}</td>
<td>{{$subCatItem->cat_name}}</td>
<td>{{$subCatItem->sub_cat_name}}</td>
@if ($subCatItem->status == 1)
<td><span class="label label-success">Active</span></td>
@else
<td><span class="label label-default">Active</span></td>
@endif
<td>
@if($subCatItem->status == 1)
<a class="btn btn-default" href="{{route('subCatItemInAc', $subCatItem-
>sub_cat_item_id)}}">
<i class="fa fa-thumbs-down"></i>
</a>
@else
<a class="btn btn-success" href="{{route('subCatItemAc', $subCatItem-
>sub_cat_item_id)}}">
<i class="fa fa-thumbs-up"></i>
</a>
@endif
<a class="btn btn-info" href="{{route('editSubCatItem', $subCatItem-
>sub_cat_item_id)}}">
<i class="fa fa-edit"></i>
</a>
<a class="btn btn-danger" href="#deleteModal{{$subCatItem->sub_cat_item_id}}"
data-toggle="modal" id="delete">
<i class="fa fa-trash"></i>
</a>
<!-- Modal -->
<div class="modal fade" id="deleteModal{{$subCatItem->sub_cat_item_id}}"
tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Confirmation</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<h4>Do you really want to delete?</h4>
<form action="{{route('subCatItemDel', $subCatItem->sub_cat_item_id)}}"
method="post">
{{ csrf_field() }}

</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-
dismiss="modal">Close</button>
<button type="submit" class="btn btn-danger">Delete</button>
</div>
</form>
</div>
</div>
</div>
{{-- End Modal --}}

</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@endsection
@include('backend/layout/footer')

Backend/Edit_Sub_Category_Item.php-

@extends('backend/layout/master')
@include('backend/layout/header')
@include('backend/layout/navbar')
@include('backend/layout/sidebar')
@section('content')
<!-- INPUT SIZING -->
<div class="row">
<div class="col-md-6">
<div class="panel">
<div class="panel-heading">
<h3 class="panel-title"> <i class="fa fa-edit"></i> Edit Sub-Category Item</h3>
</div>
<div class="panel-body">
<form method="post" action="{{route('subCatItemUp', $subCatItem-
>sub_cat_item_id)}}" enctype="multipart/form-data">
{{ csrf_field() }}
<?php

$id = $catId->cat_id;
// echo $cid;
// print_r($subCatId);
$selectBoxCat = DB::table('categories')
->where('status', 1)
->get();
?>
<div class="form-group">
<label for="title-position">Category Name:<span
class="star">*</span></label>
<select class="form-control" name="cat_id" required>
<option value="">Choose</option>
@foreach($selectBoxCat as $select)
@if ($select->cat_id == $id)
<option value="{{$select->cat_id}}" selected>{{$select-
>cat_name}}</option>
@endif
<option value="{{$select->cat_id}}">{{$select->cat_name}}</option>
@endforeach
</select>
</div>

<?php
$sub_id = $subCatItem->sub_cat_id;
$selectBoxSubCat = DB::table('sub_categories')
->where('status', 1)
->get();
?>
<div class="form-group">
<label for="title-position">Category Name:<span
class="star">*</span></label>
<select class="form-control" name="sub_cat_id" required>
<option value="">Choose</option>
@foreach($selectBoxSubCat as $selectSub)
@if ($selectSub->sub_cat_id == $sub_id)
<option value="{{$selectSub->sub_cat_id}}" selected>{{$selectSub-
>sub_cat_name}}</option>
@endif
<option value="{{$selectSub->sub_cat_id}}">{{$selectSub-
>sub_cat_name}}</option>
@endforeach
</select>
</div>

<div class="form-group">
<label for="title">Sub-Category Item Name:<span
class="star">*</span></label>
<input class="form-control" name="sub_cat_item_name" value="{{$subCatItem-
>sub_cat_item_name}}" type="text" required>
</div>
<div class="form-group">
<label for="sub-title">Sub-Category Item Details:</label>
<textarea class="form-control" name="sub_cat_item_details"
rows="4">{{$subCatItem->sub_cat_item_details}}</textarea>
</div>
<div class="form-group">
<div class="form-check">
@if ($subCatItem->status == 1)
<input class="form-check-input" type="checkbox" value="1" name="status"
id="defaultCheck1" checked>
@else
<input class="form-check-input" type="checkbox" value="1" name="status"
id="defaultCheck1">
@endif
<label class="form-check-label" for="defaultCheck1">
Status
</label>
</div>
</div>
<button type="submit" class="btn btn-primary"><i class="fa fa-edit"></i>
Update</button>
</form>
</div>
</div>
<!-- END INPUT SIZING -->
</div>
</div>
@endsection
@include('backend/layout/footer')

Backend/Add_Product.php-

@extends('backend/layout/master')
@include('backend/layout/header')
@include('backend/layout/navbar')
@include('backend/layout/sidebar')
@section('content')
<!-- INPUT SIZING -->
<div class="row">
<div class="col-md-6">
<div class="panel">
<div class="panel-heading">
<h3 class="panel-title"> <i class="lnr lnr-plus-circle"></i> Add New Product</h3>
</div>
<div class="panel-body">
<form method="post" action="{{route('storePd')}}" enctype="multipart/form-
data">
{{ csrf_field() }}
<div class="form-group">
<label for="title">Product Name:<span class="star">*</span></label>
<input class="form-control" name="product_name" placeholder="Product
name input" type="text">
</div>

<div class="form-group">
<label for="title-position">Category Name:<span
class="star">*</span></label>
<select class="form-control" id ="cat_list" name="cat_list"
onchange="myFunction(this.value);">
<option value="">Choose</option>
@foreach($category as $cat)
<option value="{{$cat->cat_id}}">{{$cat->cat_name}}</option>
@endforeach
</select>
</div>

<div class="form-group" id="sdiv">


<label for="title-position">Sub-Category Name:<span
class="star">*</span></label>
<select class="form-control" id="sub_category" name="sub_category"
onchange="mySecondFun(this.value);">
<option value="">Select category first</option>
</select>
<div class="col-md-3 mb-3" id="simg" style=" display: none">
<img style="margin-top: 30px; margin-left: 30%"
src="{{asset('backend/img/spinner-mini.gif')}}" alt="">
</div>

</div>

<div class="form-group" id="sidiv">


<label for="title-position">Sub-Category Item Name:<span
class="star">*</span></label>
<select class="form-control" id="cat_item" class="x-large"
name="sub_cat_item_id" data-dependent="category_item">
<option value="">Select sub category first</option>
</select>
<div class="col-md-3 mb-3" id="siimg" style=" display: none">
<img style="margin-top: 30px; margin-left: 30%"
src="{{asset('backend/img/spinner-mini.gif')}}" alt="">
</div>
</div>

<div class="form-group">
<label for="title">Product Code:<span class="star">*</span></label>
<input class="form-control" name="product_code" placeholder="Product code
input" type="text">
</div>

<div class="form-group">
<label for="title">Product Brand:</label>
<input class="form-control" name="product_brand" placeholder="Product
brand input" type="text">
</div>

<div class="form-group">
<label for="title">Product Size:<span class="star">*</span></label><br>
<select class="selectpicker live_search" multiple data-live-search="true"
name="product_size[]">
<option value="S">S</option>
<option value="M">M</option>
<option value="L">L</option>
<option value="XL">XL</option>
<option value="XXL">XXL</option>
<option value="XXXL">XXXL</option>
</select>
</div>
<div class="form-group">
<label for="title">Product Color:</label>
<select class="selectpicker live_search" multiple data-live-search="true"
name="product_color[]">
@foreach($color as $color)
<option value="{{$color->code}}">{{$color->color_name}}</option>
@endforeach
</select>

</div>
<div class="form-group">
<label for="title">Product Unit:</label>
<input class="form-control" name="product_unit" placeholder="Product unit
input" type="text">
</div>

<div class="form-group">
<label for="title">Product Price:<span class="star">*</span></label>
<input class="form-control" name="product_price" placeholder="Product price
input" type="number" required>
</div>
<div class="form-group">
<label for="title">Product Quantity:</label>
<input class="form-control" name="product_qty" placeholder="Product
quantity input" type="number">
</div>

<div class="form-group">
<label for="title">Product Status:</label>
<input class="form-control" name="product_status" placeholder="Product
status input" type="text">
</div>

<div class="form-group">
<label for="title">Product Discount:</label>
<input class="form-control" name="product_discount" placeholder="Product
discount input" type="number">
</div>

<div class="form-group">
<label for="sub-title">Product Details:</label>
<textarea class="form-control" name="product_details" placeholder="Product
details input" rows="4"></textarea>
</div>
<div class="form-group">
<label for="slider-image">Product Image<span class="star">*</span></label>
<div class="custom-file">
<input type="file" class="custom-file-input" name="image" id="customFile"
required>
</div>
</div>

<div class="form-group">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="1" name="status"
id="defaultCheck1">
<label class="form-check-label" for="defaultCheck1">
Status
</label>
</div>
</div>
<button type="submit" class="btn btn-primary"><i class="fa fa-plus-square"></i>
Submit</button>
</form>
</div>
</div>
<!-- END INPUT SIZING -->
</div>
</div>
{{-- JavaScript for Dynamic Selection box --}}
<script>
function myFunction(value)
{
var cat_id = value;
console.log(cat_id);
$.ajax({
type: 'POST',
url: '{{route("search")}}',
data: {
cat_id: cat_id,
"_token": "{{ csrf_token() }}",
},
datatype: 'JSON',
beforeSend: function(){
$('#sdiv').hide();
$('#simg').show();
},
success:function(data){
$('#simg').hide();
$('#sdiv').show();
var select = $('select[name=sub_category]');
select.empty();
select.append('<option value="0" >Please Select Sub Category</option>');
$.each(data,function(key, value) {
select.append('<option value=' + value.sub_cat_id + '>' +
value.sub_cat_name + '</option>');
});
}
// div.find('#sub_category').html(" ");
// div.find('#sub_category').append(op);
// $('#simg').hide();
// $('#sdiv').show();
});
}
</script>

<script type="text/javascript">
function mySecondFun(value)
{
var sub_cat_id = value;
console.log(sub_cat_id);
$.ajax({
type: 'POST',
url: '{{route("find")}}',
data: {
sub_cat_id: sub_cat_id,
"_token": "{{ csrf_token() }}",
},
datatype: 'JSON',
beforeSend: function(){
$('#sidiv').hide();
$('#siimg').show();
},
success:function(data){
$('#siimg').hide();
$('#sidiv').show();
var select = $('select[name=sub_cat_item_id]');
select.empty();
select.append('<option value="0" >Please Select Product</option>');
$.each(data,function(key, value) {
select.append('<option value=' + value.sub_cat_item_id + '>' +
value.sub_cat_item_name + '</option>');
});
}
// div.find('#sub_category').html(" ");
// div.find('#sub_category').append(op);
// $('#simg').hide();
// $('#sdiv').show();
});
}
</script>

@endsection
@include('backend/layout/footer')

Backend/View_Product.php-

@extends('backend/layout/master')
@include('backend/layout/header')
@include('backend/layout/navbar')
@include('backend/layout/sidebar')
@section('content')
<div class="row">
<div class="panel panel-headline">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-list"></i> Product Information</h3>
</div>
<div class="panel-body">
<table id="example" class="table table-striped table-bordered dt-responsive"
style="width:100%">
<thead>
<tr>
<th>SL</th>
<th>Image</th>
<th>Product Name</th>
<th>Code</th>
<th>Price</th>
<th>Qty</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@php
$i = 0;
@endphp
@foreach($product as $pdt)
@php
$i++;
@endphp
<tr>
<td>{{ $i }}</td>
<td><img src="{{URL::to($pdt->product_image)}}" style="height: 100px; width:
100px"></td>
<td>{{$pdt->product_name}}</td>
<td>{{$pdt->product_code}}</td>
<td>{{$pdt->product_price}}</td>
<td>{{$pdt->product_qty}}</td>
@if ($pdt->status == 1)
<td><span class="label label-success">Active</span></td>
@else
<td><span class="label label-default">Inactive</span></td>
@endif
<td>
@if($pdt->status == 1)
<a class="btn btn-default" href="{{route('pdInAc', $pdt->product_id)}}">
<i class="fa fa-thumbs-down"></i>
</a>
@else
<a class="btn btn-success" href="{{route('pdAc', $pdt->product_id)}}">
<i class="fa fa-thumbs-up"></i>
</a>
@endif
<a class="btn btn-danger" href="{{route('pdViewDet', $pdt->product_id)}}">
<i class="fa fa-eye"></i>
</a>
<a class="btn btn-primary" href="{{route('pdEdit', $pdt->product_id)}}">
<i class="fa fa-edit"></i>
</a>
<a class="btn btn-danger" href="#deleteModal{{$pdt->product_id}}" data-
toggle="modal" id="delete">
<i class="fa fa-trash"></i>
</a>
<!-- Modal -->
<div class="modal fade" id="deleteModal{{$pdt->product_id}}" tabindex="-1"
aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Confirmation</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<h4>Do you really want to delete?</h4>
<form action="{{route('pdDel', $pdt->product_id)}}" method="post">
{{ csrf_field() }}

</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-
dismiss="modal">Close</button>
<button type="submit" class="btn btn-danger">Delete</button>
</div>
</form>
</div>
</div>
</div>
{{-- End Modal --}}

</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@endsection
@include('backend/layout/footer')

AdminController.php-

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use DB;
class AdminController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$result = DB::table('orders')
// ->join('order_details', 'orders.order_id', '=', 'order_details.order_id')
->join('customers', 'orders.customer_id', '=', 'customers.customer_id')
->select('orders.*', 'customers.customer_name')
->get();

return view("backend/pages/dashboard")->with('result', $result);


}

public function login(){


return view('backend/pages/add_category');
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}

/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
}

/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}

/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
}

/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
//
}

/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
}
}

AuthController.php-

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\support\Facades\Redirect;
use Session;
use DB;

class authController extends Controller


{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
return view('backend/auth/login');
}

public function login_check(Request $request)


{
$admin_email = $request->email;
$admin_pass = md5($request->password);
$result=DB::table('users')
->where('email', $admin_email)
->where('password', $admin_pass)
->first();
// echo "<pre>";
// print_r($result);
// exit();
if ($result) {
Session::put('name', $result->name);
Session::put('id', $result->id);
return redirect::to('/admin/dashboard');
}else{
Session::put('message', 'Email or Password Invalid!');
return redirect::to('/admin');
}
}

public function logout()


{
Session::flush();
return redirect::to('/admin');
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}

/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
}

/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}

/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
}

/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
}
}

CategoryController.php-

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Category;

class CategoryController extends Controller


{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$cat = Category::all();
return view('backend/pages/view_category')
->with('category',$cat);
}

/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
return view("backend/pages/add_category");
}

/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$cat = new Category;

$cat->cat_name = $request->cat_name;
$cat->cat_details = $request->cat_details;
if ($request->status == 1) {
$cat->status = $request->status;
}else{
$cat->status = 0;
}

$cat->save();

$notification=array(
'message' => 'Successfully Inserted Data!',
'alert-type' => 'success'
);

return redirect()->route('addCat')->with($notification);

public function active($id){


$cat = Category::where('cat_id', $id)->get()->first();
$cat->status = 1;
$cat->save();
// echo "<pre>";
// print_r($slider);
// exit();

$notification=array(
'message' => 'Successfully Updated Data!',
'alert-type' => 'success'
);

return redirect()->route('viewCat')->with($notification);
}

public function inactive($id){

$cat = Category::find($id);
$cat->status = 0;
$cat->save();
$notification=array(
'message' => 'Successfully Updated Data!',
'alert-type' => 'success'
);

return redirect()->route('viewCat')->with($notification);
}

/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}

/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$cat = Category::where('cat_id', $id)->get()->first();
return view('backend/pages/edit_category')->with('cat', $cat);
}

/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
$cat = Category::where('cat_id', $id)->get()->first();

$cat->cat_name = $request->cat_name;
$cat->cat_details = $request->cat_details;
if ($request->status == 1) {
$cat->status = $request->status;
}else{
$cat->status = 0;
}

$cat->update();

$notification=array(
'message' => 'Successfully Updated Data!',
'alert-type' => 'success'
);

return redirect()->route('viewCat')->with($notification);

/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
$delete = Category::where('cat_id', $id)->delete();

$notification=array(
'message' => 'Successfully Deleted Data!',
'alert-type' => 'success'
);
return redirect()->route('viewCat')->with($notification);
}
}

CheckOutController.php-

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Customer;
use App\Order;
use App\OrderDetails;
use App\Payment;
use App\Shipping;
use Session;
use DB;
use Cart;
use Rakibhstu\Banglanumber\NumberToBangla;
class CheckOutController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{

$ship = Shipping::where('customer_id', Session::get('customer_id'))


->get()
->first();
if ($ship) {
return view('frontend/pages/payment');
}else{
if (session()->has('customer_id')) {
$cust_id = Session::get('customer_id');
$result =Customer::where('customer_id', $cust_id)
->get()
->first();
}
return view('frontend/pages/checkout')->with('sValue',$result);
}
}
public function order(Request $request){

$pay = new Payment;

$pay->payment_method = $request->card;
$pay->card_number = $request->number;
$pay->payment_status = 0;
$pay->save();

$payment_id = $pay->payment_id;

$cust_id = Session::get('customer_id');
$shipping = Shipping::all()->where('customer_id', $cust_id)->first();

$contents = Cart::getContent();
$qty = 0;
foreach ($contents as $item) {
$qty += $item->quantity;
}
// echo $qty;
$order = new Order;
$order->customer_id = Session::get('customer_id');
$order->shipping_id = $shipping->shipping_id;
$order->transaction_id = $payment_id;
$order->order_total = $qty;
$order->status = 0;
$order->save();

$order = Order::all()->where('transaction_id', $payment_id)->first();

$con = Cart::getContent();

foreach ($con as $cont) {


$ord = new OrderDetails;
$ord->order_id = $order->order_id;
$ord->product_id = $cont->id;
$ord->product_name = $cont->name;
$ord->product_price = $cont->price;
$ord->qty = $cont->quantity;
$ord->save();
}
Cart::clear();

return redirect()->route('confirm');

public function confirm(){

return view('frontend/pages/order_confirm');
}

public function myOrder(){


$result = DB::table('order_details')
->join('orders', 'order_details.order_id', '=', 'orders.order_id')
->join('products', 'order_details.product_id', '=', 'products.product_id')
->select('order_details.*', 'products.product_code', 'products.product_image')
->where('orders.customer_id', Session::get('customer_id'))
->get();
return view('frontend/pages/order_list')->with('result', $result);
}

public function save_shipping(Request $request){

$ship = new Shipping;


$ship->customer_id = Session::get('customer_id');
$ship->fname = $request->fname;
$ship->lname = $request->lname;
$ship->email = $request->email;
$ship->mobile = $request->phone;
$ship->address = $request->address;
$ship->city = $request->city;
$ship->zip = $request->zip;

$ship->save();

return view('frontend/pages/payment');

public function login_check(){


return view('frontend/pages/login');
}

public function customer_registration(Request $request){

$cust = new Customer;

$cust->customer_name = $request->name;
$cust->mobile = $request->mobile;
$cust->email = $request->email;
$cust->password = md5($request->password);

$cust->save();

Session::put('customer_id', $cust->customer_id);
Session::put('customer_name', $cust->customer_name);

return redirect()->route('checkout');
}

public function customer_login(Request $request){

$email = $request->email;
$pass = md5($request->password);

$result =Customer::where('email', $email)


->where('password', $pass)
->get()
->first();
$ship = Shipping::where('customer_id', $result->customer_id)
->get()
->first();
if ($result) {
Session::put('customer_id', $result->customer_id);
Session::put('customer_name', $result->customer_name);
if ($ship) {
return view('frontend/pages/payment');
}else{
return redirect()->route('checkout');
}

}else{
$notification=array(
'message' => 'Invalid Email or Password!',
'alert-type' => 'error'
);
return redirect()->route('logCk')->with($notification);
}

public function log_out(){


Session::flush();
return redirect(\URL::previous());
}

public function test(Request $request){


$sub_id = $request->sub_cat_id;

$product =DB::table('products')
->where('status', 1)
->where('sub_cat_item_id', $sub_id)
->orderby('product_id', 'desc')
->get();

$numto = new NumberToBangla();

if($product){
foreach ($product as $pro) {
$new_price = number_format($pro->product_price - ($pro->product_price * $pro-
>product_discount /100));
$output = '
<div class="col-md-3 single__pro col-lg-3 cat--1 col-sm-3 col-xs-12">
<div class="product">
<div class="product__inner">
<div class="pro__thumb">
<a href="/product-details/'.$pro->product_id.'">
<img src="'.$pro->product_image.'" alt="product images">
</a>
</div>
<div class="product__hover__info">
<ul class="product__action">
<li><a data-toggle="modal" title="Quick View" id="'.$pro-
>product_id.'" class="quick-view modal-view detail-link" href="#productModal"><span
class="ti-plus"></span></a></li>
<li><a title="Add TO Cart" href="cart.html"><span class="ti-shopping-
cart"></span></a></li>
<li><a title="Wishlist" href="wishlist.html"><span class="ti-
heart"></span></a></li>
</ul>
</div>
</div>
<div class="product__details">
<h2><a href="/product-details/'.$pro->product_id.'">'.$pro-
>product_name.'</a></h2>
<ul class="product__price">
<li class="old__price">'.number_format($pro->product_price).'</li>
<li class="new__price">৳'.$new_price.'</li>
</ul>
</div>
</div>
</div>
';
}
}
echo $output;
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}

/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
}

/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}

/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
}

/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
//
}

/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
}
}

HomeController.php-

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Slider;
use App\Product;
use App\Category;
use DB;
use Cart;
use Redirect;
use Hashids;
use App\sub_categories;

class HomeController extends Controller


{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$slider = Slider::all()->where('status',1);
$cat = Category::all()->where('status',1);
// $product = Product::all()->where('status',1);
$sub_cat = sub_categories::all()->where('status',1);

$sub_category =DB::table('sub_categories')
->join('categories', 'sub_categories.cat_id', '=', 'categories.cat_id')
->select('sub_categories.sub_cat_id','sub_categories.sub_cat_name',
'sub_categories.cat_id')
->where('sub_categories.status', 1)
->orderby('sub_cat_id', 'asc')
->get();

return view("index")->with('category', $cat)


->with('sub_category', $sub_category)
// ->with('product',$product)
->with('slider',$slider)
->with('sub_cat', $sub_cat);
}
public function how2order(){
return view("frontend/pages/order_method");
}

public function privacy(){


return view("frontend/pages/privacy_policy");
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function cart()
{
return view("frontend/pages/cart");
}
public function addTocart(Request $request){
$product_id = $request->product_id;
$quantity = $request->qty;

$product =Product::all()
->where('status', 1)
->where('product_id', $product_id)
->first();
// echo "<pre>";
// print_r($product);
// echo "</pre>";

$data['id'] = $product_id;
$data['name'] = $product->product_name;
$data['price'] = $product->product_price - ($product->product_price * $product-
>product_discount /100);
$data['quantity'] = $quantity;
$data['attributes']['image'] = $product->product_image;
$data['attributes']['product_code'] = $product->product_code;

Cart::add($data);

return redirect::to('/');
}

public function add2cart(Request $request){


$product_id = $request->product_id;
$quantity = $request->qty;
$product =Product::all()
->where('status', 1)
->where('product_id', $product_id)
->first();
// echo "<pre>";
// print_r($product);
// echo "</pre>";

$data['id'] = $product_id;
$data['name'] = $product->product_name;
$data['price'] = $product->product_price - ($product->product_price * $product-
>product_discount /100);
$data['quantity'] = $quantity;
$data['attributes']['image'] = $product->product_image;
$data['attributes']['product_code'] = $product->product_code;

Cart::add($data);

return redirect::to('/show-cart');
}

public function show_cart()


{
return view('frontend/pages/cart');
}

public function delete_cart($id){


$product_id = Hashids::decode($id);
Cart::remove($product_id);
return redirect::to('/show-cart');
}

public function update_cart(Request $request){

$id = $request->product_id;
$quantity = $request->quantity;

$data['quantity']['relative'] = false;
$data['quantity']['value'] = $quantity;

Cart::update($id, $data);
return redirect::to('/show-cart');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
}
public function filter_product($id){
$id = Hashids::decode($id);

$sub_cat =DB::table('sub_categories')
->join('sub__category__items', 'sub_categories.sub_cat_id', '=',
'sub__category__items.sub_cat_id')
->select('sub_categories.sub_cat_id','sub_categories.sub_cat_name')
->where('sub_categories.status', 1)
->where('sub__category__items.sub_cat_item_id', $id)
->first();

$find_id = DB::table('sub__category__items')
->select('sub_cat_id')
->where('status',1)
->where('sub_cat_item_id', $id)
->first();

$sub_cat_item = DB::table('sub__category__items')
->select('sub__category__items.*')
->where('status',1)
->where('sub_cat_id',$find_id->sub_cat_id)
->get();

$product =DB::table('products')
->join('sub__category__items', 'products.sub_cat_item_id', '=',
'sub__category__items.sub_cat_item_id')
->join('sub_categories', 'sub__category__items.sub_cat_id', '=',
'sub_categories.sub_cat_id')
->select('products.*')
->where('products.status', 1)
->where('sub_categories.status', 1)
->where('sub__category__items.status', 1)
->where('sub__category__items.sub_cat_item_id', $id)
->orderby('product_id', 'desc')
->get();

$sub_cat_item_name = DB::table('sub__category__items')
->select('sub_cat_item_name')
->where('status',1)
->where('sub_cat_item_id', $id)
->first();

return view('frontend/pages/filter_product')
->with('sub_cat', $sub_cat)
->with('sub_cat_item', $sub_cat_item)
->with('product',$product)
->with('scin', $sub_cat_item_name);
}

public function filter($id){


$id = Hashids::decode($id);

$sub_cat =DB::table('sub_categories')
->join('sub__category__items', 'sub_categories.sub_cat_id', '=',
'sub__category__items.sub_cat_id')
->select('sub_categories.sub_cat_id','sub_categories.sub_cat_name')
->where('sub_categories.status', 1)
->where('sub__category__items.sub_cat_item_id', $id)
->first();

$find_id = DB::table('sub__category__items')
->select('sub_cat_id')
->where('status',1)
->where('sub_cat_item_id', $id)
->first();

$sub_cat_item = DB::table('sub__category__items')
->select('sub__category__items.*')
->where('status',1)
->where('sub_cat_id',$find_id->sub_cat_id)
->get();

$product =DB::table('products')
->join('sub__category__items', 'products.sub_cat_item_id', '=',
'sub__category__items.sub_cat_item_id')
->join('sub_categories', 'sub__category__items.sub_cat_id', '=',
'sub_categories.sub_cat_id')
->select('products.*')
->where('products.status', 1)
->where('sub_categories.status', 1)
->where('sub__category__items.status', 1)
->where('sub__category__items.sub_cat_item_id', $id)
->orderby('product_id', 'desc')
->get();

$sub_cat_item_name = DB::table('sub__category__items')
->select('sub_cat_item_name')
->where('status',1)
->where('sub_cat_item_id', $id)
->first();

return view('frontend/pages/filter_product')
->with('sub_cat', $sub_cat)
->with('sub_cat_item', $sub_cat_item)
->with('product',$product)
->with('scin', $sub_cat_item_name);
}

public function test(){

$id = 7;

$result = DB::table('products')
->select('product_name')
->where('product_id', $id)
->get();

return view('frontend/pages/test')->with('result', $result);


}

public function findAllPro(Request $request)


{
$id = $request->product_id;

$result = DB::table('products')
->select('products.*')
->where('product_id', $id)
->get();

return response()->json($result);

// echo "<pre>";
// print_r($result);
// exit;
// return view('frontend/pages/test');
}

/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
// $id = Hashids::decode($id);

$product = Product::all()
->where('status',1)
->where('product_id', $id)
->first();

return view('frontend/pages/product_details')->with('product', $product);

/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
}

/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
//
}

/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
}
}

ProductController.php-
<?php

namespace App\Http\Controllers;

use App\Product;
use App\Color;
use Illuminate\Http\Request;
use Illuminate\Support\Str;
use DB;
use Image;
use File;

class ProductController extends Controller


{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$product = Product::all();
return view('backend/pages/view_product')
->with('product',$product);
}

public function search(Request $request)


{
$id = $request->cat_id;

$result = DB::table('sub_categories')
->select('sub_cat_id','sub_cat_name')
->where('status', 1)
->where('cat_id', $id )
->orderby('sub_cat_id', 'asc')
->get();
sleep(0.5);
return response()->json($result);

// echo "<pre>";
// print_r($result);
// exit;
}

public function find(Request $request)


{
$id = $request->sub_cat_id;
$res = DB::table('sub__category__items')
->select('sub_cat_item_id','sub_cat_item_name')
->where('status', 1)
->where('sub_cat_id', $id )
->orderby('sub_cat_item_id', 'asc')
->get();
sleep(0.5);
return response()->json($res);
}

/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
$category = DB::table('categories')->get();
$color = Color::all();
return view('backend/pages/add_product')->with('category',$category)->with('color',
$color);
}

/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{

$product = new Product;

$product->product_name = $request->product_name;
$product->product_code = $request->product_code;
$product->product_brand = $request->product_brand;
if ($request->product_size !='') {
$product->product_size = implode(' , ', $request->product_size);
}
if ($request->product_color !='') {
$product->product_color = implode(' , ', $request->product_color);
}
$product->product_details = $request->product_details;
$product->product_unit = $request->product_unit;
$product->product_price = $request->product_price;
$product->product_qty = $request->product_qty;
$product->product_status = $request->product_status;
$product->product_discount = $request->product_discount;
$product->sub_cat_item_id = $request->sub_cat_item_id;
$product->product_status = $request->status;
// $product->product_image = $request->product_image;

$image = $request->file('image');
if($image){
$image_name = Str::random(20);
$ext = strtolower($image->getClientOriginalExtension());
$image_full_name = $image_name.'.'.$ext;
$upload_path = 'frontend/images/product/';

if (!file_exists(public_path($upload_path))) {
mkdir(public_path($upload_path), 777, true);
}

$resize_image = Image::make($image->getRealPath());
$success = $resize_image->resize(600, 600)->save($upload_path.'/'.
$image_full_name);
// $upload_path = 'product_images/';
$image_url = $upload_path.$image_full_name;
// $success = $image->move($upload_path, $image_full_name);
if($success){
$product->product_image = $image_url;
}
}

$product->save();

$notification=array(
'message' => 'Successfully Inserted Data!',
'alert-type' => 'success'
);

return redirect()->route('addPd')->with($notification);
}

/**
* Display the specified resource.
*
* @param \App\Product $product
* @return \Illuminate\Http\Response
*/
public function show($id)
{
$product = Product::where('product_id',$id)->get()->first();
return view('backend/pages/view_product_details')->with('pdt', $product);
}

public function active($id){


$product = Product::where('product_id', $id)->get()->first();
$product->status = 1;
$product->save();
// echo "<pre>";
// print_r($slider);
// exit();

$notification=array(
'message' => 'Successfully Updated Data!',
'alert-type' => 'success'
);

return redirect()->route('viewPd')->with($notification);
}

public function inactive($id){

$product = Product::find($id);
$product->status = 0;
$product->save();

$notification=array(
'message' => 'Successfully Updated Data!',
'alert-type' => 'success'
);

return redirect()->route('viewPd')->with($notification);
}

/**
* Show the form for editing the specified resource.
*
* @param \App\Product $product
* @return \Illuminate\Http\Response
*/
public function edit(Product $product)
{
//
}

/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Product $product
* @return \Illuminate\Http\Response
*/
public function update(Request $request, Product $product)
{
//
}

/**
* Remove the specified resource from storage.
*
* @param \App\Product $product
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
$delete = Product::where('product_id', $id)->delete();

$notification=array(
'message' => 'Successfully Deleted Data!',
'alert-type' => 'success'
);
return redirect()->route('viewPd')->with($notification);
}
}

SliderController.php-

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Str;
use App\Slider;
use Image;
use File;

class SliderController extends Controller


{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$slider = Slider::all();
return view('backend/pages/view_slider')
->with('slider',$slider);
}

/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
return view('backend/pages/add_slider');
}

/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$slider = new Slider;

$slider->title = $request->title;
$slider->sub_title = $request->sub_title;
$slider->position = $request->position;
// $slider->image = $request->image;
$slider->product_code = $request->product_code;
if ($request->status == 1) {
$slider->status = $request->status;
}else{
$slider->status = 0;
}

$image = $request->file('image');
if($image){
$image_name = Str::random(20);
$ext = strtolower($image->getClientOriginalExtension());
$image_full_name = $image_name.'.'.$ext;
$upload_path = 'backend/slider/';

if (!file_exists(public_path($upload_path))) {
mkdir(public_path($upload_path), 777, true);
}

$resize_image = Image::make($image->getRealPath());
$success = $resize_image->resize(1920, 1000)->save($upload_path.'/'.
$image_full_name);
// $upload_path = 'product_images/';
$image_url = $upload_path.$image_full_name;
// $success = $image->move($upload_path, $image_full_name);
if($success){
$slider->image = $image_url;
}
}
$slider->save();

$notification=array(
'message' => 'Successfully Inserted Data!',
'alert-type' => 'success'
);

return redirect()->route('slider')->with($notification);
}

public function active($id){


$slider = Slider::where('slider_id', $id)->get()->first();
$slider->status = 1;
$slider->save();
// echo "<pre>";
// print_r($slider);
// exit();

$notification=array(
'message' => 'Successfully Updated Data!',
'alert-type' => 'success'
);

return redirect()->route('viewSlider')->with($notification);
}

public function inactive($id){


$slider = Slider::find($id);
$slider->status = 0;
$slider->save();

$notification=array(
'message' => 'Successfully Updated Data!',
'alert-type' => 'success'
);

return redirect()->route('viewSlider')->with($notification);
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}

/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$slider = Slider::where('slider_id', $id)->get()->first();
return view('backend/pages/edit_slider')->with('slider', $slider);
}

/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
$slider = Slider::where('slider_id', $id)->get()->first();

if ($request->image = '') {
//$slider = new Slider;

$slider->title = $request->title;
$slider->sub_title = $request->sub_title;
$slider->position = $request->position;
// $slider->image = $request->image;
$slider->product_code = $request->product_code;
if ($request->status == 1) {
$slider->status = $request->status;
}else{
$slider->status = 0;
}
}else{
$slider->title = $request->title;
$slider->sub_title = $request->sub_title;
$slider->position = $request->position;
// $slider->image = $request->image;
$slider->product_code = $request->product_code;
if ($request->status == 1) {
$slider->status = $request->status;
}else{
$slider->status = 0;
}

$image = $request->file('image');
if($image){
File::Delete($slider->image);

$image_name = Str::random(20);
$ext = strtolower($image->getClientOriginalExtension());
$image_full_name = $image_name.'.'.$ext;
$upload_path = 'backend/slider/';

if (!file_exists(public_path($upload_path))) {
mkdir(public_path($upload_path), 777, true);
}

$resize_image = Image::make($image->getRealPath());
$success = $resize_image->resize(1920, 1000)->save($upload_path.'/'.
$image_full_name);
// $upload_path = 'product_images/';
$image_url = $upload_path.$image_full_name;
// $success = $image->move($upload_path, $image_full_name);
if($success){
$slider->image = $image_url;
}
}
}
$slider->update();
$notification=array(
'message' => 'Successfully Updated Data!',
'alert-type' => 'success'
);

return redirect()->route('viewSlider')->with($notification);
}

/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
$slider = Slider::where('slider_id', $id)->get()->first();

File::Delete($slider->image);

$delete = Slider::where('slider_id', $id)->delete();

$notification=array(
'message' => 'Successfully Updated Data!',
'alert-type' => 'success'
);
return redirect()->route('viewSlider')->with($notification);
}
}

SubCategoryController.php-

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\sub_categories;
use DB;

class SubCategoryController extends Controller


{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$subCat = DB::table('sub_categories')
->join('categories', 'sub_categories.cat_id', '=', 'categories.cat_id')
->select('sub_categories.*', 'categories.cat_name')
->get();

return view('backend/pages/view_sub_category')
->with('subCategory',$subCat);
}

/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
return view('backend/pages/add_sub_category');
}

/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$subCat = new sub_categories;

$subCat->sub_cat_name = $request->sub_cat_name;
$subCat->sub_cat_details = $request->sub_cat_details;
$subCat->cat_id = $request->cat_id;
if ($request->status == 1) {
$subCat->status = $request->status;
}else{
$subCat->status = 0;
}

$subCat->save();

$notification=array(
'message' => 'Successfully Inserted Data!',
'alert-type' => 'success'
);

return redirect()->route('addSubCat')->with($notification);

/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}

public function active($id){


$subCat = sub_categories::where('sub_cat_id', $id)->get()->first();
$subCat->status = 1;
$subCat->save();
// echo "<pre>";
// print_r($slider);
// exit();

$notification=array(
'message' => 'Successfully Updated Data!',
'alert-type' => 'success'
);

return redirect()->route('viewSubCat')->with($notification);
}

public function inactive($id){

$subCat = sub_categories::find($id);
$subCat->status = 0;
$subCat->save();

$notification=array(
'message' => 'Successfully Updated Data!',
'alert-type' => 'success'
);

return redirect()->route('viewSubCat')->with($notification);
}

/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$subCat = sub_categories::where('sub_cat_id', $id)->get()->first();
return view('backend/pages/edit_sub_category')->with('subCat', $subCat);
}

/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
$cat = sub_categories::where('sub_cat_id', $id)->get()->first();

$cat->sub_cat_name = $request->sub_cat_name;
$cat->sub_cat_details = $request->sub_cat_details;
$cat->cat_id = $request->cat_id;
if ($request->status == 1) {
$cat->status = $request->status;
}else{
$cat->status = 0;
}

$cat->update();

$notification=array(
'message' => 'Successfully Updated Data!',
'alert-type' => 'success'
);

return redirect()->route('viewSubCat')->with($notification);

/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
$delete = sub_categories::where('sub_cat_id', $id)->delete();

$notification=array(
'message' => 'Successfully Deleted Data!',
'alert-type' => 'success'
);
return redirect()->route('viewSubCat')->with($notification);
}
}

SubCategoryItemController.php-

<?php

namespace App\Http\Controllers;
use App\Sub_Category_Item;
use App\sub_categories;
use Illuminate\Http\Request;
use DB;

class SubCategoryItemController extends Controller


{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$subCatItem = DB::table('sub__category__items')
->join('sub_categories', 'sub__category__items.sub_cat_id', '=',
'sub_categories.sub_cat_id')
->join('categories', 'sub_categories.cat_id', '=', 'categories.cat_id')
->select('sub__category__items.*', 'categories.cat_name', 'sub_categories.sub_cat_name')
->get();

return view('backend/pages/view_sub_category_item')->with('subCategoryItem',
$subCatItem);
}

/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
$cat = DB::table('categories')->get();
return view('backend/pages/add_sub_category_item')->with('category',$cat);
}

public function findSub(Request $request)


{
$id = $request->cat_id;

$result = DB::table('sub_categories')
->select('sub_cat_id','sub_cat_name')
->where('status', 1)
->where('cat_id', $id )
->orderby('sub_cat_id', 'asc')
->get();
sleep(0.5);
return response()->json($result);

// echo "<pre>";
// print_r($result);
// exit;
}

/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$subCatItem = new sub_category_item;

$subCatItem->sub_cat_item_name = $request->sub_cat_item_name;
$subCatItem->sub_cat_item_details = $request->sub_cat_item_details;
$subCatItem->sub_cat_id = $request->sub_category;
if ($request->status == 1) {
$subCatItem->status = $request->status;
}else{
$subCatItem->status = 0;
}

$subCatItem->save();

$notification=array(
'message' => 'Successfully Inserted Data!',
'alert-type' => 'success'
);

return redirect()->route('addSubCatItem')->with($notification);
}

public function active($id){


$subCatItem = sub_category_item::where('sub_cat_item_id', $id)->get()->first();
$subCatItem->status = 1;
$subCatItem->save();
// echo "<pre>";
// print_r($slider);
// exit();

$notification=array(
'message' => 'Successfully Updated Data!',
'alert-type' => 'success'
);
return redirect()->route('viewSubCatItem')->with($notification);
}

public function inactive($id){

$subCatItem = sub_category_item::find($id);
$subCatItem->status = 0;
$subCatItem->save();

$notification=array(
'message' => 'Successfully Updated Data!',
'alert-type' => 'success'
);

return redirect()->route('viewSubCatItem')->with($notification);
}

/**
* Display the specified resource.
*
* @param \App\Sub_Category_Item $sub_Category_Item
* @return \Illuminate\Http\Response
*/
public function show(Sub_Category_Item $sub_Category_Item)
{
//
}

/**
* Show the form for editing the specified resource.
*
* @param \App\Sub_Category_Item $sub_Category_Item
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$subCatItem = Sub_Category_Item::where('sub_cat_item_id', $id)->get()->first();
$catId = sub_categories::where('sub_cat_id', $subCatItem->sub_cat_id)->get()->first();
return view('backend/pages/edit_sub_category_item')->with('subCatItem', $subCatItem)-
>with('catId', $catId);
}

/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Sub_Category_Item $sub_Category_Item
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
$subCatItem = Sub_Category_Item::where('sub_cat_item_id', $id)->get()->first();

$subCatItem->sub_cat_item_name = $request->sub_cat_item_name;
$subCatItem->sub_cat_item_details = $request->sub_cat_item_details;
// $subCatItem->cat_id = $request->cat_id;
$subCatItem->sub_cat_id = $request->sub_cat_id;
if ($request->status == 1) {
$subCatItem->status = $request->status;
}else{
$subCatItem->status = 0;
}

$subCatItem->update();

$notification=array(
'message' => 'Successfully Updated Data!',
'alert-type' => 'success'
);

return redirect()->route('viewSubCatItem')->with($notification);

/**
* Remove the specified resource from storage.
*
* @param \App\Sub_Category_Item $sub_Category_Item
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
$delete = sub_category_item::where('sub_cat_item_id', $id)->delete();

$notification=array(
'message' => 'Successfully Deleted Data!',
'alert-type' => 'success'
);
return redirect()->route('viewSubCatItem')->with($notification);
}
}
CHAPTER 10: REFERENCE

I. Chapter 4: Data and Databases – Information Systems for Business and Beyond; Dave
Bourgeois and David T. Bourgeois.
II. Goldblatt, Joe. Twenty-First Century Global Ecommerce Business (The Wiley Ecommerce
Business) ISBN 0-471-39687-7
III.  "PHP: Basic syntax". The PHP Group. Retrieved 2008-02-22.
IV.  "About". Bootstrap. Retrieved February 23, 2019.
V. "PHP: Basic syntax". The Stack Overflow. Retrieved 2008-02-22.
VI. Liu Meilq Li Xiaoping, "Under the envirotrment of B2B logistics service quality and
relationship quality" , An Empirical Studlt of Commercial Economic Reseqrch,pp.
4142,2015.
VII. Y. Bakos, "The Emerging Landscape for Retail E-Commerce", Journat of Economic
Perspectives, vol. 15, no. l, 2001, pp. 69-80.
VIII. Laudon, Kenneth C.; Guercio Traver, Carol (2014). E-commerce. business. technology.
society. 10th edition. Pearson. ISBN 978-013-302444-9.
IX. Chaudhury, Abijit; Kuilboer, Jean-Pierre (2002). e-Business and e-Commerce
Infrastructure. McGraw-Hill. ISBN 978-0-07-247875-4.
X. Kessler, M (22 December 2003), "More shoppers proceed to checkout online", USA today,
retrieved 13 January 2004.
XI. Miller, Roger (2002). The Legal and E-Commerce Environment Today (hardcover ed.).
Thomson Learning.  ISBN  978-0-324-06188-8. 741 pp.
XII. “Ebay History” www.cs.brandeis.edu. Retrieved 2020-02-17.

You might also like