mirror of https://github.com/4xmen/xshop.git
added documentation to project
parent
21050c0727
commit
b0cb0d1ca4
@ -0,0 +1,81 @@
|
|||||||
|
# Introduction
|
||||||
|
|
||||||
|
## What is xShop?
|
||||||
|
|
||||||
|
> xShop is an open source shop developed in laravel, very customizable! Easy site design.
|
||||||
|
> By the way is very fast development.
|
||||||
|
> Support multilanguage sites [RTL & LTR support]
|
||||||
|
|
||||||
|
### version 2 new features
|
||||||
|
|
||||||
|
- Dashboard panel changes
|
||||||
|
- Integration of Vue.js and laravel
|
||||||
|
- Advanced charts
|
||||||
|
- Better customizable with AI & languages
|
||||||
|
- Fixed Technical issues
|
||||||
|
- Project size compression
|
||||||
|
- UI/UX is more specific
|
||||||
|
- Developer Friendlier
|
||||||
|
|
||||||
|
## Requirement
|
||||||
|
|
||||||
|
- php 8.2.x or above [ php-gd, sqlite3, php-soap, php-zip ]
|
||||||
|
- mysql or mariadb or sqlite
|
||||||
|
- composer
|
||||||
|
- recommends install imagemagick on server to more image performance [ to generate webp images ]
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Installation [ Development mode ]
|
||||||
|
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> Create new database and rename `.env.example` to `.env` then update you `.env` configs so run this commands:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/4xmen/xshop.git
|
||||||
|
cd xshop
|
||||||
|
cp .env.example .env
|
||||||
|
composer install
|
||||||
|
php artisan migrate:fresh --seed
|
||||||
|
php artisan storage:link
|
||||||
|
php artisan key:generate
|
||||||
|
php artisan serv
|
||||||
|
|
||||||
|
# to develop front-end
|
||||||
|
npm i
|
||||||
|
php artisan client
|
||||||
|
npm install @rollup/rollup-win32-x64-msvc # just for windows if the below line dose not work
|
||||||
|
npm run dev
|
||||||
|
|
||||||
|
# or with yarn
|
||||||
|
|
||||||
|
yarn install
|
||||||
|
php artisan client
|
||||||
|
yarn add @rollup/rollup-win32-x64-msvc # just for windows if the below line dose not work
|
||||||
|
yarn dev
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> Default admin email is : `developer@example.com` (developer) or `admin@example.com` (admin) and default password is: `password`
|
||||||
|
|
||||||
|
|
||||||
|
### Deploy guide
|
||||||
|
|
||||||
|
We recommend deploy xShop on VPS, so create database and run this commands:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /home/[yourUsername]/[pathOfYourWebsitePublicHTML]
|
||||||
|
git clone https://github.com/4xmen/xshop.git . # if this command not work make empty this folder
|
||||||
|
cp .env.example .env
|
||||||
|
nano .env # edit your config db, url, etc.
|
||||||
|
composer install
|
||||||
|
php artisan migrate:fresh --seed
|
||||||
|
php artisan storage:link
|
||||||
|
php key:generate
|
||||||
|
npm install
|
||||||
|
php artisan client
|
||||||
|
npm run build
|
||||||
|
```
|
@ -0,0 +1,66 @@
|
|||||||
|
# Settings Model
|
||||||
|
|
||||||
|
The `Settings` model is designed to manage various configurations for the system. It allows administrators to set and customize system behaviors and functionalities in a structured way. Each setting can be categorized and stored with specific attributes to facilitate easy management.
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
- **id**:
|
||||||
|
- A unique identifier for each setting entry. This number is automatically generated by the system to ensure that every setting can be distinguished from one another.
|
||||||
|
|
||||||
|
- **section**:
|
||||||
|
- This field categorizes settings into specific groups. Common values include `general`, `seo`, `sms`, `theme`, or any custom value defined by the user. This categorization helps simplify the management of settings.
|
||||||
|
|
||||||
|
- **type**:
|
||||||
|
- Defines the data type for the setting value. It could be one of the following options:
|
||||||
|
- **TEXT**: Standard text input.
|
||||||
|
- **NUMBER**: Numeric input.
|
||||||
|
- **LONGTEXT**: For handling large amounts of text.
|
||||||
|
- **CODE**: Suitable for programming code snippets.
|
||||||
|
- **EDITOR**: A rich text editor for formatted text.
|
||||||
|
- **CATEGORY**: For selecting specific categories.
|
||||||
|
- **GROUP**: For grouping related settings.
|
||||||
|
- **CHECKBOX**: A boolean option that can be either checked or unchecked.
|
||||||
|
- **FILE**: For uploading files.
|
||||||
|
- **COLOR**: For color selection.
|
||||||
|
- **SELECT**: A dropdown menu for selecting one option.
|
||||||
|
- **MENU**: For managing navigation menus.
|
||||||
|
- **LOCATION**: For selecting geographic locations.
|
||||||
|
- **ICON**: For selecting icons.
|
||||||
|
- **DATE**: A date input.
|
||||||
|
- **DATETIME**: A date and time input.
|
||||||
|
- **TIME**: A time input.
|
||||||
|
|
||||||
|
- **title**:
|
||||||
|
- A descriptive title for the setting. This title will be displayed in the admin interface, providing clarity on what the setting controls.
|
||||||
|
|
||||||
|
- **active**:
|
||||||
|
- A boolean field indicating whether this setting is currently active. By default, it is set to `true`, meaning the setting is enabled.
|
||||||
|
|
||||||
|
- **key**:
|
||||||
|
- A unique identifier for the setting. This key must be unique and is used to retrieve or modify the setting in the system.
|
||||||
|
|
||||||
|
- **value**:
|
||||||
|
- This field allows for the storage of the setting's value. It can accommodate translation if needed, meaning the same setting could have different values for different languages.
|
||||||
|
|
||||||
|
- **raw**:
|
||||||
|
- A text field that stores the original value of the setting without any translations. This allows administrators to easily reference the underlying data.
|
||||||
|
|
||||||
|
- **ltr**:
|
||||||
|
- A boolean field that indicates if the layout should be left-to-right. By default, it is set to `false`.
|
||||||
|
|
||||||
|
- **is_basic**:
|
||||||
|
- A boolean field indicating whether this setting is a core requirement for the system. It is set to `false` by default, but essential settings should be marked as true.
|
||||||
|
|
||||||
|
- **size**:
|
||||||
|
- This field specifies a value from 1 to 12 to determine the width of the input field in Bootstrap layout. The default value is set to `12`, which is full-width.
|
||||||
|
|
||||||
|
- **data**:
|
||||||
|
- A JSON field that can store additional information related to the setting. For example, if the type is `NUMBER`, the `data` field could specify the minimum and maximum values allowed. This flexibility allows for enhanced validation and configurability.
|
||||||
|
|
||||||
|
## Dynamic Field Generation
|
||||||
|
|
||||||
|
When displaying settings in the system, the appropriate input fields are dynamically generated based on the type of each setting. This automation simplifies the user's experience, enabling them to easily manage settings without needing technical knowledge. You can add your own setting if you wish. When you change design of theme setting will be updated.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
This structure outlines the `Settings` model, emphasizing how it can be used to manage configurations effectively and simplify the administrative tasks associated with system settings. The document is designed to be user-friendly for non-technical users, ensuring clarity and ease of understanding.
|
@ -0,0 +1,57 @@
|
|||||||
|
# GFX (Graphical Interface) Configuration
|
||||||
|
|
||||||
|
The `gfxes` table is a vital component of the website's graphical interface settings. It stores various design parameters that determine how the site looks and feels. Users can think of these settings as the foundational elements that shape their experience when using the site.
|
||||||
|
|
||||||
|
## GFX Table
|
||||||
|
|
||||||
|
### Fields
|
||||||
|
|
||||||
|
- **id**:
|
||||||
|
- A unique identifier for each design setting. This number helps the system manage and reference each setting efficiently.
|
||||||
|
|
||||||
|
- **key**:
|
||||||
|
- A unique string that represents a specific design aspect (e.g., background color). This is how the system recognizes and uses the setting.
|
||||||
|
|
||||||
|
- **label**:
|
||||||
|
- A user-friendly name for the design setting. This is what you will see as a description and helps you understand what each setting controls (e.g., "Background Color").
|
||||||
|
|
||||||
|
- **system**:
|
||||||
|
- A boolean value indicating whether the setting is part of the core system design. A value of `1` means that it is a predefined system setting, while `0` would mean it is user-defined or customizable.
|
||||||
|
|
||||||
|
- **value**:
|
||||||
|
- A long text field that contains the actual value for the setting. This could be a color code, font style, or other relevant design information.
|
||||||
|
|
||||||
|
### Design Parameters
|
||||||
|
|
||||||
|
Here are some of the key design settings stored in the `gfxes` table, along with their explanations:
|
||||||
|
|
||||||
|
- **Background Color (`background`)**:
|
||||||
|
- This setting defines the overall background color of the website, providing a base tone for all other design elements. For example, a light gray color (`#eeeeee`) can create a soft and inviting atmosphere.
|
||||||
|
|
||||||
|
- **Primary Color (`primary`)**:
|
||||||
|
- This is the main color used for buttons, links, and other significant elements throughout the site. It is often the color that stands out the most, helping to guide users' attention. An example primary color would be a vibrant teal (`#03b2b5`).
|
||||||
|
|
||||||
|
- **Secondary Color (`secondary`)**:
|
||||||
|
- This color complements the primary color and is used for secondary actions or highlights. It can provide additional visual interest, such as a shade of blue (`#0064c2`).
|
||||||
|
|
||||||
|
- **Text Color (`text`)**:
|
||||||
|
- This setting determines the color of the text displayed on the site. For readability, a dark color, such as black (`#111111`), is usually chosen.
|
||||||
|
|
||||||
|
- **Theme Mode (`dark`)**:
|
||||||
|
- This setting indicates whether the website should use a light or dark theme. A value of `0` may imply a light-themed interface, while `1` could be used for a darker background.
|
||||||
|
|
||||||
|
- **Border Radius (`border-radius`)**:
|
||||||
|
- This controls the roundness of the corners for elements such as buttons and cards. A value like `7px` gives a soft, rounded appearance.
|
||||||
|
|
||||||
|
- **Shadow (`shadow`)**:
|
||||||
|
- This setting adds depth to elements by applying a shadow effect. For instance, a shadow value of `2px 2px 4px #777777` can create a subtle 3D look, enhancing the visual hierarchy.
|
||||||
|
|
||||||
|
- **Container (`container`)**:
|
||||||
|
- This defines the layout structure of the main content area. The value `container` refers to a predefined layout style used to improve spacing and alignment.
|
||||||
|
|
||||||
|
- **Font (`font`)**:
|
||||||
|
- This specifies the font style used throughout the website. Using a font like `Vazir` can help maintain consistency and improve the overall aesthetics of the text.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
By managing these graphical settings, the website's design can be customized to create a unique and engaging user experience. Users should appreciate how these elements combine to create an inviting and recognizable brand identity, enhancing overall satisfaction and usability.
|
@ -0,0 +1,64 @@
|
|||||||
|
# Area & Theme Part
|
||||||
|
|
||||||
|
The `areas` table defines the different design environments available within the website. Each of these areas can contain specific components known as "theme parts," which are essentially the building blocks for various pages across the site.
|
||||||
|
|
||||||
|
## Areas Table
|
||||||
|
|
||||||
|
### Fields
|
||||||
|
|
||||||
|
- **id**:
|
||||||
|
- A unique identifier for each area, allowing the system to reference and manage them effectively.
|
||||||
|
|
||||||
|
- **name**:
|
||||||
|
- A string representing the name of the area, which must be unique to avoid confusion.
|
||||||
|
|
||||||
|
- **max**:
|
||||||
|
- This tiny integer indicates the maximum number of allowed theme parts within this area. For instance, if the value is `1`, only one theme part can be assigned.
|
||||||
|
|
||||||
|
- **icon**:
|
||||||
|
- An optional string for the icon associated with the area, which can be used for visual representation in the user interface.
|
||||||
|
|
||||||
|
- **valid_segments**:
|
||||||
|
- A JSON field that specifies which segments from the website can load within this area. This ensures flexibility and specificity in the content shown.
|
||||||
|
|
||||||
|
- **preview**:
|
||||||
|
- This optional string contains a link to a preview of the area, such as a route name (e.g., `client.welcome`), helping users visualize what the area will look like.
|
||||||
|
|
||||||
|
- **use_default**:
|
||||||
|
- A boolean indicating whether to use the default header and footer for this area or to create custom versions. A value of `true` means that the default header and footer will be utilized.
|
||||||
|
|
||||||
|
- **sort**:
|
||||||
|
- An integer determining the order in which this area is displayed relative to others.
|
||||||
|
|
||||||
|
## Parts Table
|
||||||
|
|
||||||
|
The `parts` table acts as a child of the `areas` table, defining the specific segments and their configurations within each area.
|
||||||
|
|
||||||
|
### Fields
|
||||||
|
|
||||||
|
- **id**:
|
||||||
|
- A unique identifier for each part.
|
||||||
|
|
||||||
|
- **area_id**:
|
||||||
|
- A foreign key linking the part to a specific area. This enables the system to group parts together logically.
|
||||||
|
|
||||||
|
- **segment**:
|
||||||
|
- A string representing one of the allowed segments for the area. It defines what specific type of content is included in this part.
|
||||||
|
|
||||||
|
- **part**:
|
||||||
|
- A string that indicates the specific theme part used in this segment, determining how the page will be rendered visually.
|
||||||
|
|
||||||
|
- **data**:
|
||||||
|
- A JSON field that contains additional configuration and settings relevant to the theme part, such as customization options or parameters.
|
||||||
|
|
||||||
|
- **sort**:
|
||||||
|
- An integer specifying the order of the part within its area, which can be adjusted based on user preference.
|
||||||
|
|
||||||
|
- **custom**:
|
||||||
|
- An optional string that indicates whether this part is customized for a specific category, group, post, or another unique element.
|
||||||
|
|
||||||
|
## Understanding Areas and Theme Parts
|
||||||
|
|
||||||
|
The website consists of multiple areas, each of which a developer can configure through the control panel. In the control panel, developers have the ability to specify which theme parts should be included in each area. This provides flexibility and customization to the design of various pages on the site.
|
||||||
|
|
||||||
|
It's important to note that the options for managing these areas and theme parts are exclusively available for users with the developer role. This ensures that only authorized users can make changes that affect the overall structure and presentation of the website.
|
@ -0,0 +1,167 @@
|
|||||||
|
# Invoice, Order, and Quantity Models
|
||||||
|
|
||||||
|
The `Invoice`, `Order`, and `Quantity` models work together to facilitate order processing, invoicing, and inventory management within your application. These models enable the recording of customer transactions, tracking of orders, and management of stock quantities.
|
||||||
|
|
||||||
|
## Invoice Model
|
||||||
|
|
||||||
|
The `Invoice` model represents a record of a completed transaction between the customer and the business, detailing the items purchased and the associated costs.
|
||||||
|
|
||||||
|
### Fields Description
|
||||||
|
|
||||||
|
### 1. `id`
|
||||||
|
- **Type:** Integer
|
||||||
|
- **Description:** A unique identifier for each invoice. This field is automatically generated and serves as the primary key for the model.
|
||||||
|
|
||||||
|
### 2. `customer_id`
|
||||||
|
- **Type:** Unsigned Big Integer
|
||||||
|
- **Description:** The ID of the customer associated with this invoice. This establishes a foreign key relationship with the `Customer` model.
|
||||||
|
|
||||||
|
### 3. `status`
|
||||||
|
- **Type:** Enum
|
||||||
|
- **Description:** The current status of the invoice, defined in the `Invoice` model's class variable `$invoiceStatus`. The default is "PENDING".
|
||||||
|
|
||||||
|
### 4. `total_price`
|
||||||
|
- **Type:** Unsigned Big Integer (Nullable)
|
||||||
|
- **Description:** The total amount due on the invoice. The default value is `0`, and this field can be `NULL` until calculated.
|
||||||
|
|
||||||
|
### 5. `count`
|
||||||
|
- **Type:** Integer (Nullable)
|
||||||
|
- **Description:** The total number of items included in the invoice. The default value is `0`.
|
||||||
|
|
||||||
|
### 6. `meta`
|
||||||
|
- **Type:** JSON (Nullable)
|
||||||
|
- **Description:** Additional metadata related to the invoice, useful for storing extra information in JSON format.
|
||||||
|
|
||||||
|
### 7. `discount_id`
|
||||||
|
- **Type:** Unsigned Big Integer (Nullable)
|
||||||
|
- **Description:** The ID of any discount applied to the invoice. This establishes a foreign key relationship with the `Discount` model.
|
||||||
|
|
||||||
|
### 8. `desc`
|
||||||
|
- **Type:** Text (Nullable)
|
||||||
|
- **Description:** A description or notes about the invoice. This field is optional.
|
||||||
|
|
||||||
|
### 9. `hash`
|
||||||
|
- **Type:** String (Max Length: 32) (Nullable, Unique)
|
||||||
|
- **Description:** A unique hash identifier for the invoice, used for tracking and referencing.
|
||||||
|
|
||||||
|
### 10. `transport_id`
|
||||||
|
- **Type:** Unsigned Big Integer (Nullable)
|
||||||
|
- **Description:** The ID of the transport method used for the invoice. This establishes a foreign key relationship with the `Transport` model.
|
||||||
|
|
||||||
|
### 11. `transport_price`
|
||||||
|
- **Type:** Unsigned Big Integer
|
||||||
|
- **Description:** The cost associated with the transport method. Default value is `0`.
|
||||||
|
|
||||||
|
### 12. `credit_price`
|
||||||
|
- **Type:** Unsigned Big Integer
|
||||||
|
- **Description:** The amount of credit applied to this invoice. Default value is `0`.
|
||||||
|
|
||||||
|
### 13. `reserve`
|
||||||
|
- **Type:** Boolean
|
||||||
|
- **Description:** Indicates whether the items on the invoice are reserved. Default value is `0`.
|
||||||
|
|
||||||
|
### 14. `invoice_id`
|
||||||
|
- **Type:** Unsigned Big Integer (Nullable)
|
||||||
|
- **Description:** This field can be used for linking to other invoices, creating relationships between them.
|
||||||
|
|
||||||
|
### 15. `address_alt`
|
||||||
|
- **Type:** String (Nullable)
|
||||||
|
- **Description:** An alternative address for delivery or billing purposes.
|
||||||
|
|
||||||
|
### 16. `address_id`
|
||||||
|
- **Type:** Unsigned Big Integer (Nullable)
|
||||||
|
- **Description:** The ID of the associated address for delivery, establishing a foreign key relationship with the `Address` model.
|
||||||
|
|
||||||
|
### 17. `tracking_code`
|
||||||
|
- **Type:** String (Nullable)
|
||||||
|
- **Description:** A code used for tracking shipment of the order associated with the invoice.
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The `Invoice` model provides a structured representation of a financial transaction, including customer details, status, payment information, and associated products.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Order Model
|
||||||
|
|
||||||
|
The `Order` model represents a specific item or service being purchased within an invoice, linking the invoice to products.
|
||||||
|
|
||||||
|
### Fields Description
|
||||||
|
|
||||||
|
### 1. `id`
|
||||||
|
- **Type:** Integer
|
||||||
|
- **Description:** A unique identifier for each order. This field is automatically generated and serves as the primary key for the model.
|
||||||
|
|
||||||
|
### 2. `invoice_id`
|
||||||
|
- **Type:** Unsigned Big Integer
|
||||||
|
- **Description:** The ID of the invoice associated with this order. Establishes a foreign key relationship with the `Invoice` model.
|
||||||
|
|
||||||
|
### 3. `product_id`
|
||||||
|
- **Type:** Unsigned Big Integer
|
||||||
|
- **Description:** The ID of the product being ordered. Establishes a foreign key relationship with the `Product` model.
|
||||||
|
|
||||||
|
### 4. `quantity_id`
|
||||||
|
- **Type:** Unsigned Big Integer (Nullable)
|
||||||
|
- **Description:** The ID of the specific quantity or stock item. This is optional and can be used for stock management.
|
||||||
|
|
||||||
|
### 5. `count`
|
||||||
|
- **Type:** Integer (Nullable)
|
||||||
|
- **Description:** The quantity of the product being ordered. The default value is `1`.
|
||||||
|
|
||||||
|
### 6. `price_total`
|
||||||
|
- **Type:** Unsigned Integer
|
||||||
|
- **Description:** The total price for the ordered product, typically calculated as `quantity * unit price`.
|
||||||
|
|
||||||
|
### 7. `data`
|
||||||
|
- **Type:** JSON (Nullable)
|
||||||
|
- **Description:** This field allows for flexible storage of additional information related to the order, in JSON format.
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The `Order` model provides a detailed structure for managing individual items within an invoice, allowing for clear tracking of purchases.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Quantity Model
|
||||||
|
|
||||||
|
The `Quantity` model is designed to manage inventory levels for specific products, allowing for precise tracking of stock.
|
||||||
|
|
||||||
|
### Fields Description
|
||||||
|
|
||||||
|
### 1. `id`
|
||||||
|
- **Type:** Integer
|
||||||
|
- **Description:** A unique identifier for each quantity record. This field is automatically generated and serves as the primary key for the model.
|
||||||
|
|
||||||
|
### 2. `product_id`
|
||||||
|
- **Type:** Unsigned Big Integer
|
||||||
|
- **Description:** The ID of the product associated with this quantity record. Establishes a foreign key relationship with the `Product` model.
|
||||||
|
|
||||||
|
### 3. `count`
|
||||||
|
- **Type:** Unsigned Integer
|
||||||
|
- **Description:** The current stock level of the product. The default value is `0`.
|
||||||
|
|
||||||
|
### 4. `price`
|
||||||
|
- **Type:** Unsigned Big Integer
|
||||||
|
- **Description:** The price of the product associated with this quantity record. The default value is `0`.
|
||||||
|
|
||||||
|
### 5. `image`
|
||||||
|
- **Type:** Unsigned Big Integer (Nullable)
|
||||||
|
- **Description:** The ID of an associated image for the product. This field is optional.
|
||||||
|
|
||||||
|
### 6. `data`
|
||||||
|
- **Type:** Long Text (Nullable)
|
||||||
|
- **Description:** Additional data related to the inventory record, allowing for flexible storage of information.
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The `Quantity` model allows for effective inventory management by tracking stock levels, prices, and additional information related to specific products.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Relationships Overview
|
||||||
|
|
||||||
|
- The `Invoice` model is linked to multiple `Order` records through the `invoice_id`.
|
||||||
|
- Each `Order` can reference a specific `Product` and potentially a `Quantity`.
|
||||||
|
- The `Quantity` model is related to `Products` to accurately reflect inventory levels.
|
||||||
|
|
||||||
|
By integrating the `Invoice`, `Order`, and `Quantity` models, your application can handle full e-commerce functionalities, including invoicing, order tracking, and stock management.
|
@ -0,0 +1,43 @@
|
|||||||
|
# Transport M~~odel~~
|
||||||
|
|
||||||
|
The `Transport` model represents the various shipping and delivery methods available for fulfilling customer orders. This model is essential for managing the logistics of order fulfillment, including associated costs and default settings for shipping options.
|
||||||
|
|
||||||
|
## Fields Description
|
||||||
|
|
||||||
|
### 1. `id`
|
||||||
|
- **Type:** Integer
|
||||||
|
- **Description:** A unique identifier for each transport method. This field is automatically generated and serves as the primary key for the model.
|
||||||
|
|
||||||
|
### 2. `title`
|
||||||
|
- **Type:** Text
|
||||||
|
- **Description:** The name of the transport method (e.g., "Standard Shipping", "Express Delivery"). This field is required.
|
||||||
|
|
||||||
|
### 3. `description`
|
||||||
|
- **Type:** Text (Nullable)
|
||||||
|
- **Description:** A detailed description of the transport method, providing additional information to customers. This field is optional.
|
||||||
|
|
||||||
|
### 4. `sort`
|
||||||
|
- **Type:** Unsigned Integer
|
||||||
|
- **Description:** A numeric value used to determine the order in which transport methods are displayed to customers (e.g., lower numbers appear first). The default value is `0`.
|
||||||
|
|
||||||
|
### 5. `is_default`
|
||||||
|
- **Type:** Boolean
|
||||||
|
- **Description:** A flag indicating whether this transport method is the default option for customers. The default value is `0`, meaning it's not the default unless specified.
|
||||||
|
|
||||||
|
### 6. `price`
|
||||||
|
- **Type:** Unsigned Integer
|
||||||
|
- **Description:** The cost associated with using this transport method. The default value is `0`, allowing for free shipping options if necessary.
|
||||||
|
|
||||||
|
### 7. `icon`
|
||||||
|
- **Type:** String (Nullable)
|
||||||
|
- **Description:** A URL or path to an icon representing the transport method, which can be used in the user interface for better visual representation. This field is optional.
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The `Transport` model provides a structured approach to managing the various shipping options available to customers, helping to streamline the order fulfillment process and improving user experience by presenting clear, organized transport choices.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Relationships Overview
|
||||||
|
|
||||||
|
While the `Transport` model primarily focuses on defining types of delivery methods, it typically establishes relationships with orders and invoices, allowing for seamless tracking of ordered items through their respective shipping methods.
|
@ -0,0 +1,100 @@
|
|||||||
|
# Menu and Item Models
|
||||||
|
|
||||||
|
The `Menu` and `Item` models work together to create a flexible navigation structure for your application. This setup allows users to define menus and populate them with items that can either link to dynamic content (e.g., categories) or direct URLs.
|
||||||
|
|
||||||
|
## Menu Model
|
||||||
|
|
||||||
|
The `Menu` model represents a collection of `Item` entries that are displayed to users as navigation options.
|
||||||
|
|
||||||
|
### Fields Description
|
||||||
|
|
||||||
|
### 1. `id`
|
||||||
|
- **Type:** Integer
|
||||||
|
- **Description:** A unique identifier for each menu. This field is automatically generated and serves as the primary key for the model.
|
||||||
|
|
||||||
|
### 2. `name`
|
||||||
|
- **Type:** String
|
||||||
|
- **Description:** The name of the menu (e.g., "Main Menu", "Footer Menu"). This field is required.
|
||||||
|
|
||||||
|
### 3. `user_id`
|
||||||
|
- **Type:** Unsigned Big Integer
|
||||||
|
- **Description:** The ID of the user who created or owns this menu, establishing a foreign key relationship with the `User` model.
|
||||||
|
|
||||||
|
### 4. `softDeletes`
|
||||||
|
- **Type:** Timestamp
|
||||||
|
- **Description:** A field used for soft deleting menus, allowing you to retain records without permanently removing them. This provides the ability to restore deleted menus.
|
||||||
|
|
||||||
|
### 5. `timestamps`
|
||||||
|
- **Type:** Timestamps
|
||||||
|
- **Description:** Automatically managed fields for tracking when the menu was created and last updated.
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The `Menu` model serves as a foundational component for organizing navigation within your application, linking users to various items.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Item Model
|
||||||
|
|
||||||
|
The `Item` model represents individual entries within a `Menu`, which can either link to a specific content type (like a `Category`) or redirect to a specified URL.
|
||||||
|
|
||||||
|
### Fields Description
|
||||||
|
|
||||||
|
### 1. `id`
|
||||||
|
- **Type:** Integer
|
||||||
|
- **Description:** A unique identifier for each item. This field is automatically generated and serves as the primary key for the model.
|
||||||
|
|
||||||
|
### 2. `title`
|
||||||
|
- **Type:** Text
|
||||||
|
- **Description:** The title of the item (e.g., "Products", "Contact Us"). This field is required.
|
||||||
|
|
||||||
|
### 3. `menuable_id`
|
||||||
|
- **Type:** Unsigned Big Integer (Nullable)
|
||||||
|
- **Description:** This field represents the ID of the associated model that the item links to (like a `Category`). It's set to `NULL` if linking directly via a URL.
|
||||||
|
|
||||||
|
### 4. `menuable_type`
|
||||||
|
- **Type:** String (Nullable)
|
||||||
|
- **Description:** This enables polymorphic behavior, indicating the type of model the item references (e.g., `Category`). It's used in conjunction with `menuable_id`.
|
||||||
|
|
||||||
|
### 5. `kind`
|
||||||
|
- **Type:** String (Nullable)
|
||||||
|
- **Description:** Specifies the nature of the item; can be `module` if it links to another model (e.g., category) or `direct` for a direct URL link.
|
||||||
|
|
||||||
|
### 6. `meta`
|
||||||
|
- **Type:** Text (Nullable)
|
||||||
|
- **Description:** Allows for storing additional metadata related to the item, useful for links or dynamic behaviors.
|
||||||
|
|
||||||
|
### 7. `parent`
|
||||||
|
- **Type:** Unsigned Integer (Nullable)
|
||||||
|
- **Description:** Represents the ID of the parent item if this item is a sub-item, enabling hierarchical item structures. Default is `NULL`.
|
||||||
|
|
||||||
|
### 8. `sort`
|
||||||
|
- **Type:** Unsigned Integer
|
||||||
|
- **Description:** A numeric value used to control the display order of menu items. Lower values appear first—the default is `0`.
|
||||||
|
|
||||||
|
### 9. `user_id`
|
||||||
|
- **Type:** Unsigned Big Integer
|
||||||
|
- **Description:** The ID of the user who created or owns this item, establishing a foreign key relationship with the `User` model.
|
||||||
|
|
||||||
|
### 10. `menu_id`
|
||||||
|
- **Type:** Unsigned Big Integer
|
||||||
|
- **Description:** The ID of the associated menu to which this item belongs, establishing a foreign key relationship with the `Menu` model.
|
||||||
|
|
||||||
|
### Foreign Key Relationships
|
||||||
|
|
||||||
|
- **user_id:** References the `User` model.
|
||||||
|
- **menu_id:** References the `Menu` model.
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The `Item` model structures individual components of a menu, allowing for flexibility in navigation and direct linking, ultimately enhancing the user experience within the application.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Relationships Overview
|
||||||
|
|
||||||
|
- Each `Menu` can contain multiple `Item` entries.
|
||||||
|
- Each `Item` can link to a `Category` or have a direct URL, as defined by `menuable_id`, `menuable_type`, and `kind`.
|
||||||
|
- Items can be organized hierarchically through the `parent` field.
|
||||||
|
|
||||||
|
By utilizing both the `Menu` and `Item` models, your application can achieve dynamic and organized navigation, catering to various user needs.
|
@ -0,0 +1,45 @@
|
|||||||
|
# Slider Model
|
||||||
|
|
||||||
|
The `Slider` model represents promotional or informational banners displayed on a website. These sliders can showcase images and text to engage users and highlight important content, products, or services.
|
||||||
|
|
||||||
|
## Fields Description
|
||||||
|
|
||||||
|
### 1. `id`
|
||||||
|
- **Type:** Integer
|
||||||
|
- **Description:** A unique identifier for each slider. This field is automatically generated and serves as the primary key for the model.
|
||||||
|
|
||||||
|
### 2. `body`
|
||||||
|
- **Type:** Text
|
||||||
|
- **Description:** The main content of the slider, which can include promotional text or relevant information. This field is required.
|
||||||
|
|
||||||
|
### 3. `image`
|
||||||
|
- **Type:** String (Nullable)
|
||||||
|
- **Description:** The URL or path to an image that accompanies the slider content. This field is optional, allowing for text-only sliders if preferred.
|
||||||
|
|
||||||
|
### 4. `tag`
|
||||||
|
- **Type:** String (Nullable)
|
||||||
|
- **Description:** A custom tag or label that may help categorize or provide additional context about the slider (e.g., "Promotion", "Featured"). This field is optional.
|
||||||
|
|
||||||
|
### 5. `user_id`
|
||||||
|
- **Type:** Unsigned Big Integer
|
||||||
|
- **Description:** The ID of the user who created or owns this slider, establishing a foreign key relationship with the `User` model.
|
||||||
|
|
||||||
|
### 6. `status`
|
||||||
|
- **Type:** Unsigned Tiny Integer
|
||||||
|
- **Description:** Indicates the visibility status of the slider. The default value is `0`, which could signify that the slider is inactive or not displayed. (Use other values to represent active and other states as needed.)
|
||||||
|
|
||||||
|
### 7. `data`
|
||||||
|
- **Type:** JSON (Nullable)
|
||||||
|
- **Description:** A flexible field for storing additional data related to the slider. This could include settings like display duration or animation effects, allowing for greater customization.
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The `Slider` model is a versatile tool for managing dynamic banners within your application, enabling the effective presentation of promotional content and multimedia. It supports interaction through various properties, empowering users to customize their display.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Relationships Overview
|
||||||
|
|
||||||
|
- Each `Slider` is associated with a user through the `user_id`, which can be used to track ownership or authorship.
|
||||||
|
|
||||||
|
The `Slider` model allows you to create engaging visual content that can significantly enhance the user experience on your website or application.
|
@ -0,0 +1,45 @@
|
|||||||
|
# Evaluation and Rate Models
|
||||||
|
|
||||||
|
The `Evaluation` and `Rate` models are designed to enable users to provide assessments and scores for different models or entities in the system. These models work together to facilitate a comprehensive feedback mechanism, making it easy for organizations to gather and analyze user evaluations and ratings.
|
||||||
|
|
||||||
|
## Evaluation Model
|
||||||
|
|
||||||
|
The `Evaluation` model is used to create and manage evaluations that can be associated with various entities in the system. This model allows different types of content (like products, services, or experiences) to be evaluated according to a specific title.
|
||||||
|
|
||||||
|
### Fields
|
||||||
|
|
||||||
|
- **id**:
|
||||||
|
- A unique identifier for each evaluation. This number is automatically generated by the system to differentiate each evaluation entry.
|
||||||
|
|
||||||
|
- **title**:
|
||||||
|
- The name or title of the evaluation. This field provides a clear description of what the evaluation is about, helping users understand the focus of their assessment.
|
||||||
|
|
||||||
|
- **nullableMorphs('evaluationable')**:
|
||||||
|
- This field allows the evaluation to be associated with different types of models (e.g., a product or a service). The term "morphs" means that this model can reference several different entities, providing flexibility in what can be evaluated.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Rate Model
|
||||||
|
|
||||||
|
The `Rate` model is specifically designed to store ratings provided by users or customers based on the evaluations created. It captures the scoring and allows the evaluator to be identified, whether they are a registered user or a guest customer.
|
||||||
|
|
||||||
|
### Fields
|
||||||
|
|
||||||
|
- **id**:
|
||||||
|
- A unique identifier for each rating. Like evaluations, this number is automatically generated by the system to easily track and manage each rate entry.
|
||||||
|
|
||||||
|
- **morphs('rateable')**:
|
||||||
|
- This field connects the rating to a specific evaluation. It indicates which evaluation the user is rating, allowing for multiple ratings against various evaluations.
|
||||||
|
|
||||||
|
- **morphs('rater')**:
|
||||||
|
- This field designates who provided the rating. It can reference either a registered user or a customer, giving insight into who is providing feedback.
|
||||||
|
|
||||||
|
- **rate**:
|
||||||
|
- A tiny integer that indicates the score given by the rater. This score usually reflects the quality or satisfaction level associated with the evaluation, with predefined ranges (e.g., 1 to 5 stars).
|
||||||
|
|
||||||
|
- **evaluation_id**:
|
||||||
|
- The unique identifier of the evaluation being rated. This field establishes a foreign key relationship, linking the rate to a specific evaluation record, thus ensuring that every rating can be traced back to its corresponding evaluation.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
This structure explains the `Evaluation` and `Rate` models in a clear and simple manner, making it easy for anyone to understand their purpose and functionality without needing a technical background.
|
@ -0,0 +1,239 @@
|
|||||||
|
# Environment file or `.env`
|
||||||
|
|
||||||
|
> **Note:** If you need to change any config, be careful. If you need to add spaces or special characters, you need to surround the value with `"` to follow the application name for better understanding when changing the `.env` file.
|
||||||
|
|
||||||
|
## Create `.env`
|
||||||
|
|
||||||
|
> Create a new database and rename `.env.example` to `.env`, then update your `.env` configurations by running these commands (in the project directory):
|
||||||
|
|
||||||
|
### Linux or MacOSX platform
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cp .env.example .env
|
||||||
|
```
|
||||||
|
|
||||||
|
### Windows platform
|
||||||
|
|
||||||
|
```bash
|
||||||
|
copy .env.example .env
|
||||||
|
```
|
||||||
|
|
||||||
|
## Application Configuration
|
||||||
|
|
||||||
|
### Application Name
|
||||||
|
|
||||||
|
```bash
|
||||||
|
APP_NAME=xShop2
|
||||||
|
```
|
||||||
|
Example after changing:
|
||||||
|
```bash
|
||||||
|
APP_NAME="My shop project"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Application Environment
|
||||||
|
|
||||||
|
```bash
|
||||||
|
APP_ENV=local
|
||||||
|
```
|
||||||
|
Specify the environment. Common values are `local`, `production`, `testing`.
|
||||||
|
|
||||||
|
### Application Key
|
||||||
|
|
||||||
|
```bash
|
||||||
|
APP_KEY=
|
||||||
|
```
|
||||||
|
Set this value by running `php artisan key:generate` in your terminal.
|
||||||
|
|
||||||
|
### Application Debug Mode
|
||||||
|
|
||||||
|
```bash
|
||||||
|
APP_DEBUG=true
|
||||||
|
```
|
||||||
|
Set to `false` in production for security reasons.
|
||||||
|
|
||||||
|
### Application Timezone
|
||||||
|
|
||||||
|
```bash
|
||||||
|
APP_TIMEZONE=ASIA/TEHRAN
|
||||||
|
```
|
||||||
|
Set your application's timezone. Use `date.timezone` values from PHP.
|
||||||
|
|
||||||
|
### Application URL
|
||||||
|
|
||||||
|
```bash
|
||||||
|
APP_URL=http://127.0.0.1:8000
|
||||||
|
```
|
||||||
|
The URL of your application.
|
||||||
|
|
||||||
|
### Localization
|
||||||
|
|
||||||
|
```bash
|
||||||
|
APP_LOCALE=en
|
||||||
|
APP_FALLBACK_LOCALE=en
|
||||||
|
APP_FAKER_LOCALE=en_US
|
||||||
|
```
|
||||||
|
Set the default locale and fallback locale for localization.
|
||||||
|
|
||||||
|
### Maintenance Mode
|
||||||
|
|
||||||
|
```bash
|
||||||
|
APP_MAINTENANCE_DRIVER=file
|
||||||
|
APP_MAINTENANCE_STORE=database
|
||||||
|
```
|
||||||
|
Settings for maintaining your application.
|
||||||
|
|
||||||
|
### Logging Configuration
|
||||||
|
|
||||||
|
```bash
|
||||||
|
LOG_CHANNEL=stack
|
||||||
|
LOG_STACK=single
|
||||||
|
LOG_DEPRECATIONS_CHANNEL=null
|
||||||
|
LOG_LEVEL=debug
|
||||||
|
```
|
||||||
|
Determine the logging channels and level.
|
||||||
|
|
||||||
|
## Database Configuration
|
||||||
|
|
||||||
|
### SQLite
|
||||||
|
|
||||||
|
```bash
|
||||||
|
DB_CONNECTION=sqlite
|
||||||
|
DB_DATABASE=/path/to/database.sqlite
|
||||||
|
```
|
||||||
|
For SQLite, create an empty database file as follows:
|
||||||
|
```bash
|
||||||
|
touch /path/to/database.sqlite
|
||||||
|
```
|
||||||
|
|
||||||
|
### MySQL
|
||||||
|
|
||||||
|
```bash
|
||||||
|
DB_CONNECTION=mysql
|
||||||
|
DB_HOST=127.0.0.1
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_DATABASE=xshop_db
|
||||||
|
DB_USERNAME=root
|
||||||
|
DB_PASSWORD=
|
||||||
|
```
|
||||||
|
Ensure you set the correct database name, username, and password.
|
||||||
|
|
||||||
|
## Session Configuration
|
||||||
|
|
||||||
|
```bash
|
||||||
|
SESSION_DRIVER=database
|
||||||
|
SESSION_LIFETIME=9999999
|
||||||
|
SESSION_ENCRYPT=false
|
||||||
|
SESSION_PATH=/
|
||||||
|
SESSION_DOMAIN=null
|
||||||
|
```
|
||||||
|
Configure session handling using the database.
|
||||||
|
|
||||||
|
## Broadcasting
|
||||||
|
|
||||||
|
```bash
|
||||||
|
BROADCAST_CONNECTION=log
|
||||||
|
```
|
||||||
|
Set the broadcasting connection.
|
||||||
|
|
||||||
|
## Filesystem
|
||||||
|
|
||||||
|
```bash
|
||||||
|
FILESYSTEM_DISK=local
|
||||||
|
```
|
||||||
|
Set the default disk for file storage.
|
||||||
|
|
||||||
|
## Cache Configuration
|
||||||
|
|
||||||
|
```bash
|
||||||
|
CACHE_STORE=database
|
||||||
|
CACHE_PREFIX=
|
||||||
|
```
|
||||||
|
Set cache configuration.
|
||||||
|
|
||||||
|
## Redis Configuration
|
||||||
|
|
||||||
|
```bash
|
||||||
|
REDIS_CLIENT=phpredis
|
||||||
|
REDIS_HOST=127.0.0.1
|
||||||
|
REDIS_PASSWORD=null
|
||||||
|
REDIS_PORT=6379
|
||||||
|
```
|
||||||
|
Configure Redis for caching and sessions.
|
||||||
|
|
||||||
|
## Mail Configuration
|
||||||
|
|
||||||
|
```bash
|
||||||
|
MAIL_MAILER=log
|
||||||
|
MAIL_HOST=127.0.0.1
|
||||||
|
MAIL_PORT=2525
|
||||||
|
MAIL_USERNAME=null
|
||||||
|
MAIL_PASSWORD=null
|
||||||
|
MAIL_ENCRYPTION=null
|
||||||
|
MAIL_FROM_ADDRESS="hello@example.com"
|
||||||
|
MAIL_FROM_NAME="${APP_NAME}"
|
||||||
|
```
|
||||||
|
Set mail settings for your application.
|
||||||
|
|
||||||
|
## Media Configuration
|
||||||
|
|
||||||
|
```bash
|
||||||
|
MEDIA_WATERMARK_SIZE=15
|
||||||
|
MEDIA_WATERMARK_OPACITY=50
|
||||||
|
```
|
||||||
|
Configure media settings, such as watermarking.
|
||||||
|
|
||||||
|
## AWS Configuration
|
||||||
|
|
||||||
|
```bash
|
||||||
|
AWS_ACCESS_KEY_ID=
|
||||||
|
AWS_SECRET_ACCESS_KEY=
|
||||||
|
AWS_DEFAULT_REGION=us-east-1
|
||||||
|
AWS_BUCKET=
|
||||||
|
AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||||
|
```
|
||||||
|
Set your AWS S3 configuration if needed.
|
||||||
|
|
||||||
|
## Multi-language Support
|
||||||
|
|
||||||
|
```bash
|
||||||
|
XLANG_ACTIVE=false
|
||||||
|
XLANG_MAIN=en
|
||||||
|
XLANG_API_URL="http://5.255.98.77:3001"
|
||||||
|
```
|
||||||
|
Enable multi-language support.
|
||||||
|
|
||||||
|
## Currency Configuration
|
||||||
|
|
||||||
|
```bash
|
||||||
|
CURRENCY_SYMBOL="$"
|
||||||
|
CURRENCY_FACTOR=1
|
||||||
|
CURRENCY_CODE=USD
|
||||||
|
```
|
||||||
|
|
||||||
|
- **CURRENCY_FACTOR** is used for currency conversion; for example, to convert Toman to Rial, it should be set to 10.
|
||||||
|
|
||||||
|
## SMS Configuration
|
||||||
|
|
||||||
|
```bash
|
||||||
|
SMS_SING=true
|
||||||
|
SMS_DRIVER=Kavenegar
|
||||||
|
SMS_TOKEN=
|
||||||
|
SMS_USER=
|
||||||
|
SMS_PASSWORD=
|
||||||
|
SMS_URL="https://api.kavenegar.com/v1/TOKEN/verify/lookup.json"
|
||||||
|
SMS_NUMBER=
|
||||||
|
```
|
||||||
|
Settings for sending SMS.
|
||||||
|
|
||||||
|
## Payment Gateway Configuration
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ZARINPAL_MERCHANT=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
|
||||||
|
ZIBAL_MERCHANT=zibal
|
||||||
|
PAY_GATEWAY=zibal
|
||||||
|
```
|
||||||
|
Settings for payment gateways, for example, ZarinPal and Zibal.
|
||||||
|
|
||||||
|
---
|
||||||
|
#### Note
|
||||||
|
Ensure you fill in the required values in the `.env` file according to your environment and needs.
|
@ -0,0 +1,44 @@
|
|||||||
|
# Discount Model
|
||||||
|
|
||||||
|
The `Discount` model is designed to manage discounts applied to products or for general usage within your application. It supports various types of discounts, including specific product discounts and overarching discounts applicable to multiple products.
|
||||||
|
|
||||||
|
## Fields Description
|
||||||
|
|
||||||
|
### 1. `id`
|
||||||
|
- **Type:** Integer
|
||||||
|
- **Description:** A unique identifier for each discount. This field is automatically generated and serves as the primary key for the model.
|
||||||
|
|
||||||
|
### 2. `title`
|
||||||
|
- **Type:** Text (Nullable)
|
||||||
|
- **Description:** The title of the discount. This field provides a brief name or reference for the discount, helping users quickly understand its purpose.
|
||||||
|
|
||||||
|
### 3. `body`
|
||||||
|
- **Type:** LongText (Nullable)
|
||||||
|
- **Description:** A detailed description of the discount. This text can include terms, conditions, or specifics regarding how the discount is applied.
|
||||||
|
|
||||||
|
### 4. `product_id`
|
||||||
|
- **Type:** Unsigned Big Integer (Nullable)
|
||||||
|
- **Description:** The ID of the product to which the discount applies. If this field is null, it indicates that the discount applies generally to multiple products rather than a specific one.
|
||||||
|
|
||||||
|
### 5. `type`
|
||||||
|
- **Type:** Enum
|
||||||
|
- **Description:** This field specifies the type of discount being applied. It can include values like percentage discounts, fixed amount discounts, or special promotional discounts, as defined in `App\Models\Discount::$doscount_type`.
|
||||||
|
|
||||||
|
### 6. `code`
|
||||||
|
- **Type:** String (Max Length: 100) (Nullable)
|
||||||
|
- **Description:** A unique code that can be used to apply the discount at checkout. This code may be required for specific discounts and is optional for general discounts. The default value is `null`.
|
||||||
|
|
||||||
|
### 7. `amount`
|
||||||
|
- **Type:** Unsigned Big Integer
|
||||||
|
- **Description:** The value of the discount, which can represent either a fixed amount (e.g., $20 off) or a percentage (e.g., 20%) depending on the `type` of discount selected. This field is mandatory.
|
||||||
|
|
||||||
|
### 8. `expire`
|
||||||
|
- **Type:** DateTime (Nullable, Default: null)
|
||||||
|
- **Description:** This field represents the expiration date and time for the discount. If set, the discount will no longer be valid after this date. It's optional, and discounts may be permanent if this field is left null.
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The `Discount` model provides flexible discount management, allowing users to create discounts that can be specific to particular products or universally applicable. It accommodates various discount types with the option for unique codes and expiration dates, ensuring versatility in promotional strategies.
|
||||||
|
|
||||||
|
---
|
||||||
|
By implementing the `Discount` model, you can effectively manage discounts across your e-commerce application, targeting specific products or creating larger promotional campaigns easily.
|
@ -0,0 +1,73 @@
|
|||||||
|
# Gallery Model
|
||||||
|
|
||||||
|
The `Gallery` model is designed to manage collections of images in your application. Each gallery can have a unique title, description, and a set of images associated with it.
|
||||||
|
|
||||||
|
## Fields Description
|
||||||
|
|
||||||
|
### 1. `id`
|
||||||
|
- **Type:** Integer
|
||||||
|
- **Description:** A unique identifier for each gallery. This field is automatically generated and serves as the primary key for the model.
|
||||||
|
|
||||||
|
### 2. `title`
|
||||||
|
- **Type:** Text
|
||||||
|
- **Description:** The title of the gallery. This field provides a name for the gallery, helping users quickly identify its content.
|
||||||
|
|
||||||
|
### 3. `slug`
|
||||||
|
- **Type:** String (Unique)
|
||||||
|
- **Description:** A URL-friendly version of the gallery title, used for web addressing. This field is unique and helps in SEO optimization.
|
||||||
|
|
||||||
|
### 4. `description`
|
||||||
|
- **Type:** Text (Nullable)
|
||||||
|
- **Description:** A detailed description of the gallery. This text can provide context or information about the images contained within the gallery.
|
||||||
|
|
||||||
|
### 5. `view`
|
||||||
|
- **Type:** Unsigned Tiny Integer
|
||||||
|
- **Description:** This field tracks the number of times the gallery has been viewed. The default value is `0`.
|
||||||
|
|
||||||
|
### 6. `status`
|
||||||
|
- **Type:** Unsigned Tiny Integer
|
||||||
|
- **Description:** This field indicates the current status of the gallery (e.g., active, inactive). The default value is `0`.
|
||||||
|
|
||||||
|
### 7. `user_id`
|
||||||
|
- **Type:** Unsigned Big Integer
|
||||||
|
- **Description:** The ID of the user who created or owns the gallery. This establishes a relationship between the gallery and its creator.
|
||||||
|
|
||||||
|
## Image Model
|
||||||
|
|
||||||
|
The `Image` model represents individual images associated with a gallery. Multiple images can belong to a single gallery, allowing for dynamic and rich media presentations.
|
||||||
|
|
||||||
|
### Fields Description
|
||||||
|
|
||||||
|
### 1. `id`
|
||||||
|
- **Type:** Integer
|
||||||
|
- **Description:** A unique identifier for each image. This field is automatically generated and serves as the primary key for the model.
|
||||||
|
|
||||||
|
### 2. `gallery_id`
|
||||||
|
- **Type:** Unsigned Big Integer
|
||||||
|
- **Description:** The ID of the gallery to which this image belongs. This establishes a relationship between images and the corresponding gallery.
|
||||||
|
|
||||||
|
### 3. `user_id`
|
||||||
|
- **Type:** Unsigned Big Integer
|
||||||
|
- **Description:** The ID of the user who uploaded or owns the image.
|
||||||
|
|
||||||
|
### 4. `title`
|
||||||
|
- **Type:** Text (Nullable)
|
||||||
|
- **Description:** An optional title for the image. This field can provide additional context or description of the image.
|
||||||
|
|
||||||
|
### 5. `sort`
|
||||||
|
- **Type:** Unsigned Integer
|
||||||
|
- **Description:** This field represents the order in which images are displayed within the gallery. The default value is `0`.
|
||||||
|
|
||||||
|
### 6. Timestamps
|
||||||
|
- **Description:** This model will automatically manage `created_at` and `updated_at` timestamps for tracking when images are added or modified.
|
||||||
|
|
||||||
|
### Foreign Key Constraints
|
||||||
|
- The `user_id` in the `images` table references the `id` field in the `users` table to link images to their respective users.
|
||||||
|
- The `gallery_id` in the `images` table references the `id` field in the `galleries` table to link images to their corresponding galleries.
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The `Gallery` and `Image` models work together to form a flexible and dynamic image management system. Galleries can contain multiple images, each with detailed information such as titles and sorting orders. This structure enhances user experience by allowing organized and visually appealing presentations of image collections.
|
||||||
|
|
||||||
|
---
|
||||||
|
By implementing this gallery system, you can create rich media experiences in your application, with easy management of images and their associations to galleries.
|
@ -0,0 +1,44 @@
|
|||||||
|
# Clip Model
|
||||||
|
|
||||||
|
The `Clip` model is designed to manage video clips within your application. Each video clip includes important metadata, such as title, description, file paths, and related user information.
|
||||||
|
|
||||||
|
## Fields Description
|
||||||
|
|
||||||
|
### 1. `id`
|
||||||
|
- **Type:** Integer
|
||||||
|
- **Description:** A unique identifier for each video clip. This field is automatically generated and serves as the primary key for the model.
|
||||||
|
|
||||||
|
### 2. `title`
|
||||||
|
- **Type:** String
|
||||||
|
- **Description:** The title of the video clip. This field provides a name for the video, helping users easily identify its content.
|
||||||
|
|
||||||
|
### 3. `slug`
|
||||||
|
- **Type:** String (Unique)
|
||||||
|
- **Description:** A URL-friendly version of the video title. This field is used for SEO optimization and must be unique to ensure proper URL routing.
|
||||||
|
|
||||||
|
### 4. `body`
|
||||||
|
- **Type:** Text (Nullable)
|
||||||
|
- **Description:** A detailed description of the video clip. This field can include information about the video, its content, or any relevant context.
|
||||||
|
|
||||||
|
### 5. `file`
|
||||||
|
- **Type:** String (Max Length: 2048) (Nullable)
|
||||||
|
- **Description:** The file path to the actual video clip. This field allows for the storage of the video file in your preferred location (e.g., local, cloud storage).
|
||||||
|
|
||||||
|
### 6. `cover`
|
||||||
|
- **Type:** String (Max Length: 2048) (Nullable)
|
||||||
|
- **Description:** This field stores the file path to the cover image (poster) for the video clip. The cover image is automatically generated and saved by the system when the video is uploaded, serving as a thumbnail for better visual presentation.
|
||||||
|
|
||||||
|
### 7. `user_id`
|
||||||
|
- **Type:** Unsigned Big Integer
|
||||||
|
- **Description:** The ID of the user who uploaded or owns the video clip. This field links the video to its creator and manages ownership.
|
||||||
|
|
||||||
|
### 8. `status`
|
||||||
|
- **Type:** Unsigned Tiny Integer
|
||||||
|
- **Description:** This field indicates the current status of the video clip (e.g., active, inactive). The default value is `0`, typically representing an inactive or draft state until the video is ready for public viewing.
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The `Clip` model provides a robust framework for managing video content within your application. By including essential fields for metadata—such as titles, file paths, and user associations—it enables users to upload and manage video clips effectively. Additionally, the automatic generation of cover images enhances the visual appeal and usability of video listings.
|
||||||
|
|
||||||
|
---
|
||||||
|
By integrating the `Clip` model, you can create a well-organized system for handling video content, improving user engagement and content discoverability in your application.
|
@ -0,0 +1,54 @@
|
|||||||
|
# Advertise
|
||||||
|
|
||||||
|
The `Adv` model represents advertisements displayed within your application. These ads can promote products, services, or special offers, and have specific functionalities based on the number of clicks they receive.
|
||||||
|
|
||||||
|
## Fields Description
|
||||||
|
|
||||||
|
### 1. `id`
|
||||||
|
- **Type:** Integer
|
||||||
|
- **Description:** A unique identifier for each advertisement. This field is automatically generated and serves as the primary key for the model.
|
||||||
|
|
||||||
|
### 2. `title`
|
||||||
|
- **Type:** String
|
||||||
|
- **Description:** The title of the advertisement, used to describe its content or purpose. This field is required.
|
||||||
|
|
||||||
|
### 3. `expire`
|
||||||
|
- **Type:** Date
|
||||||
|
- **Description:** The expiration date of the advertisement. Once the date is reached, the ad may no longer be displayed, depending on the application logic.
|
||||||
|
|
||||||
|
### 4. `image`
|
||||||
|
- **Type:** String
|
||||||
|
- **Description:** The URL or path to the image associated with the advertisement. This field is required, as it provides the visual context for the ad.
|
||||||
|
|
||||||
|
### 5. `max_click`
|
||||||
|
- **Type:** Unsigned Integer
|
||||||
|
- **Description:** The maximum number of clicks allowed for the advertisement. If this value is reached, the advertisement will no longer be shown. A value of `0` means there is no maximum limit, allowing the ad to be displayed indefinitely.
|
||||||
|
|
||||||
|
### 6. `click`
|
||||||
|
- **Type:** Unsigned Integer
|
||||||
|
- **Description:** The current number of clicks received by the advertisement. This value is incremented each time the ad is clicked. It allows the application to track engagement.
|
||||||
|
|
||||||
|
### 7. `status`
|
||||||
|
- **Type:** Boolean
|
||||||
|
- **Description:** Indicates the active status of the advertisement. A value of `0` means the ad is inactive and should not be displayed, while a value of `1` signifies that it is active.
|
||||||
|
|
||||||
|
### 8. `link`
|
||||||
|
- **Type:** String
|
||||||
|
- **Description:** The URL that users will be redirected to when they click the advertisement. This field is required, as it provides the target destination for clicks.
|
||||||
|
|
||||||
|
### 9. `user_id`
|
||||||
|
- **Type:** Unsigned Big Integer
|
||||||
|
- **Description:** The ID of the user who created or owns this advertisement, establishing a foreign key relationship with the `User` model.
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The `Adv` model is designed to manage advertisement content within your application, providing essential fields to control display, engagement, and limitations based on user interactions. It allows for dynamic promotion while ensuring efficient tracking of user engagement through click counts.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Functionality Overview
|
||||||
|
|
||||||
|
- **Display Logic:** An advertisement will be displayed as long as its `max_click` limit is not reached, or if `max_click` is set to `0`.
|
||||||
|
- **Engagement Tracking:** The application can track how many times the advertisement has been clicked and can adjust its status accordingly.
|
||||||
|
|
||||||
|
This model enables effective advertising management, supporting both textual and visual content to enhance your application's marketing efforts.
|
@ -0,0 +1,62 @@
|
|||||||
|
# Attachment Model
|
||||||
|
|
||||||
|
The `Attachment` model is designed to manage files and documents associated with your application. These attachments can be linked to various content types (such as posts, products, etc.) or stand alone, providing users with downloadable resources.
|
||||||
|
|
||||||
|
## Fields Description
|
||||||
|
|
||||||
|
### 1. `id`
|
||||||
|
- **Type:** Integer
|
||||||
|
- **Description:** A unique identifier for each attachment. This field is automatically generated and serves as the primary key for the model.
|
||||||
|
|
||||||
|
### 2. `title`
|
||||||
|
- **Type:** Text
|
||||||
|
- **Description:** The title of the attachment, offering a brief description of its content. This field is required.
|
||||||
|
|
||||||
|
### 3. `slug`
|
||||||
|
- **Type:** String (Unique)
|
||||||
|
- **Description:** A unique identifier used in the URL, which helps to easily reference the attachment. This field must be unique across all attachments.
|
||||||
|
|
||||||
|
### 4. `subtitle`
|
||||||
|
- **Type:** Text
|
||||||
|
- **Description:** A secondary description that provides additional context about the attachment. This field is required.
|
||||||
|
|
||||||
|
### 5. `body`
|
||||||
|
- **Type:** Text
|
||||||
|
- **Description:** The main content associated with the attachment, which can provide more detailed information or instructions related to the attachment.
|
||||||
|
|
||||||
|
### 6. `file`
|
||||||
|
- **Type:** String (Nullable, Max Length: 2048)
|
||||||
|
- **Description:** The path or URL to the actual file for download. This field is optional, allowing for attachments without a file.
|
||||||
|
|
||||||
|
### 7. `ext`
|
||||||
|
- **Type:** String (Nullable)
|
||||||
|
- **Description:** The file extension of the attachment (e.g., .pdf, .docx). This field is optional and can be used to determine the file type.
|
||||||
|
|
||||||
|
### 8. `downloads`
|
||||||
|
- **Type:** Unsigned Big Integer
|
||||||
|
- **Description:** The total number of times the attachment has been downloaded. The default value is `0`, and it can be used for tracking engagement.
|
||||||
|
|
||||||
|
### 9. `is_fillable`
|
||||||
|
- **Type:** Boolean
|
||||||
|
- **Description:** This field indicates whether the attachment should be shown in the main attachments list. A value of `false` means the attachment will not be visible in the general attachment list, and will only be displayed within related content (like a post). The default value is `true`, allowing visibility by default.
|
||||||
|
|
||||||
|
### 10. `size`
|
||||||
|
- **Type:** Unsigned Big Integer
|
||||||
|
- **Description:** The size (in bytes) of the attachment file. The default value is `0`.
|
||||||
|
|
||||||
|
### 11. `attachable`
|
||||||
|
- **Type:** Morph (Nullable)
|
||||||
|
- **Description:** This polymorphic relation allows the attachment to belong to various models (e.g., posts, products). If an attachment is not linked to any model, this field can be null.
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The `Attachment` model serves as a versatile tool for managing downloadable files within your application, enabling users to access additional resources related to specific content. It provides detailed tracking of downloads and allows for selective visibility based on the `is_fillable` attribute.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Functionality Overview
|
||||||
|
|
||||||
|
- **Conditional Listing:** If `is_fillable` is set to `false`, the attachment will not appear in the general attachment listing; instead, it will be accessible only through the related content.
|
||||||
|
- **Extensibility:** The `attachable` field supports polymorphic relationships, allowing flexibility in linking attachments to various content types within the application.
|
||||||
|
|
||||||
|
This model is essential for managing attachments efficiently, ensuring a seamless user experience when accessing additional resources.
|
@ -0,0 +1,58 @@
|
|||||||
|
# Tags Model
|
||||||
|
|
||||||
|
The `Tags` model is designed to categorize and tag different entities within the application. This functionality allows users to organize content such as clips, articles, and products effectively. Tags help improve searchability and organization across the platform.
|
||||||
|
|
||||||
|
## Tags Table
|
||||||
|
|
||||||
|
### Fields
|
||||||
|
|
||||||
|
- **id**:
|
||||||
|
- A unique identifier for each tag. This number is automatically generated by the system to distinguish each tag.
|
||||||
|
|
||||||
|
- **name**:
|
||||||
|
- A JSON field that contains the name(s) of the tag. This allows for multilingual support or different aliases for the same tag.
|
||||||
|
|
||||||
|
- **slug**:
|
||||||
|
- A JSON field that provides a URL-friendly version of the tag name. This is often used in routes or links to improve SEO and user experience.
|
||||||
|
|
||||||
|
- **type**:
|
||||||
|
- An optional string field that can define the type of the tag. This allows for categorizing tags further if needed.
|
||||||
|
|
||||||
|
- **order_column**:
|
||||||
|
- An optional integer field that indicates the order in which tags should be displayed. This enables custom sorting of tags.
|
||||||
|
|
||||||
|
- **timestamps**:
|
||||||
|
- Boolean fields for `created_at` and `updated_at`. These fields automatically store the creation and modification timestamps for each tag.
|
||||||
|
|
||||||
|
## Taggables Table
|
||||||
|
|
||||||
|
The `taggables` table serves as a pivot table for the many-to-many relationship between tags and other entities (like clips, articles, and products). It allows multiple entities to share the same tag and vice versa.
|
||||||
|
|
||||||
|
### Fields
|
||||||
|
|
||||||
|
- **tag_id**:
|
||||||
|
- A foreign key that references the `id` in the `tags` table. It establishes the relationship between a tag and the tagged entity. Deleting a tag will cascade the delete operation to this table.
|
||||||
|
|
||||||
|
- **taggable**:
|
||||||
|
- This morphs into two fields: `taggable_id` and `taggable_type`, allowing various models to be tagged (e.g., clips, articles, products). The `taggable_type` indicates which model is being tagged.
|
||||||
|
|
||||||
|
- **unique constraint**:
|
||||||
|
- Ensures that a combination of `tag_id`, `taggable_id`, and `taggable_type` is unique. This prevents duplicate entries for the same tag on the same entity.
|
||||||
|
|
||||||
|
## Tag Management with Spatie
|
||||||
|
|
||||||
|
Tags are managed using the `spatie/laravel-tags` package, which provides a robust and convenient API for tagging functionality. This package allows you to easily manage and retrieve tags associated with various entities.
|
||||||
|
|
||||||
|
### Taggable Entities
|
||||||
|
|
||||||
|
The tagging system is flexible and can be used across multiple entity types, such as:
|
||||||
|
|
||||||
|
- **Clips**
|
||||||
|
- **Posts**
|
||||||
|
- **Products**
|
||||||
|
|
||||||
|
Each of these entities can be tagged with relevant keywords, allowing users to filter or search by tags efficiently.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
This structure outlines the `Tags` model and its relationship with the `taggables` table, highlighting the robustness of the tagging system and its management via the `spatie/laravel-tags` package. The document is designed to be clear and accessible for users with varying levels of technical knowledge.
|
@ -0,0 +1,36 @@
|
|||||||
|
# SEO
|
||||||
|
|
||||||
|
In this system, we have strived to provide all the essential technical components necessary for optimizing your website's SEO. Everything is accessible through a user-friendly graphical interface (GUI) in the control panel, allowing you to manage your website's SEO in the best possible way.
|
||||||
|
|
||||||
|
For instance, the editors in key sections of the site scrutinize keywords and offer tailored recommendations to help you enhance your content. Additionally, the system generates multiple sitemaps and provides a wide array of features, which we will detail further in the next section.
|
||||||
|
|
||||||
|
## SEO Features
|
||||||
|
|
||||||
|
Our system is fully equipped with a comprehensive range of SEO features designed to enhance your website's visibility and performance:
|
||||||
|
|
||||||
|
1. **XML Sitemaps**: Automatically generated files that list your website's important pages, images, videos, and other assets.
|
||||||
|
2. **Robots.txt**: Configured to guide search engines on which pages or files they can or cannot access from your site.
|
||||||
|
3. **Canonical Tags**: Implemented to specify the preferred URL for duplicate or similar content, helping to avoid indexing issues.
|
||||||
|
4. **Meta Titles**: Predefined HTML elements that define the title of each web page in search results, improving click-through rates.
|
||||||
|
5. **Meta Descriptions**: Optimized HTML attributes that summarize each web page's content succinctly and attractively.
|
||||||
|
6. **Header Tags (H1, H2, H3, etc.)**: Strategically structured to enhance content hierarchy on your pages, making it easier for search engines to understand.
|
||||||
|
7. **Schema Markup**: Incorporated structured data vocabulary that helps search engines interpret your content more effectively.
|
||||||
|
8. **Open Graph Tags**: Set up meta tags that control how URLs are previewed when shared on social media platforms.
|
||||||
|
9. **AMP (Accelerated Mobile Pages)**: Utilized web component framework ensuring your mobile pages load swiftly.
|
||||||
|
10. **Page Speed Optimization**: Implemented techniques to significantly improve your website's loading times.
|
||||||
|
11. **Mobile Responsiveness**: Designed to ensure your website adapts seamlessly to various screen sizes and devices.
|
||||||
|
12. **URL Structure**: Clean, descriptive, and keyword-rich URLs are created to enhance user experience and search engine indexing.
|
||||||
|
13. **Breadcrumbs**: Integrated navigational aids that clearly show users their location within the website's hierarchy.
|
||||||
|
14. **Image Optimization**: Images are compressed properly, and appropriate alt text is used to improve accessibility and SEO.
|
||||||
|
15. **Crawl Budget Optimization**: Efficiently managed to ensure search engines crawl and index your site effectively.
|
||||||
|
16. **Hreflang Tags**: Utilized to inform search engines about the language and geographical targeting of your webpages.
|
||||||
|
17. **Pagination**: Proper handling of content distributed across multiple pages to enhance user experience.
|
||||||
|
18. **XML Feed**: Structured data feeds for products, jobs, or other content types are provided for better indexing.
|
||||||
|
19. **Lazy Loading**: Applied techniques to defer the loading of non-critical resources, enhancing page load time.
|
||||||
|
20. **JavaScript SEO**: Ensured that search engines can crawl and index JavaScript-generated content properly.
|
||||||
|
21. **Core Web Vitals**: Continuous monitoring of Google's metrics for page experience, including LCP, FID, and CLS.
|
||||||
|
22. **Structured Data Testing**: The system validates and debugs structured data implementations to ensure accuracy.
|
||||||
|
23. **Progressive Web Apps (PWAs)**: Features that provide app-like experiences directly in web browsers for enhanced engagement.
|
||||||
|
24. **International SEO**: Fully optimized for multiple languages, allowing your site to reach a global audience.
|
||||||
|
|
||||||
|
> Remember, "Great SEO is not just about getting to the top of search results—it's about staying there and paving the way for limitless possibilities!" Let's optimize and elevate your online presence!
|
@ -0,0 +1,51 @@
|
|||||||
|
# Multi Languages Config
|
||||||
|
|
||||||
|
The application supports a multi-language configuration to cater to diverse user bases. The language settings must be enabled in the `.env` file to utilize this functionality. The following environment variables should be configured:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
XLANG_ACTIVE=true
|
||||||
|
XLANG_MAIN=fa
|
||||||
|
```
|
||||||
|
|
||||||
|
- **XLANG_ACTIVE**: This setting must be set to `true` to enable multi-language support within the application.
|
||||||
|
- **XLANG_MAIN**: This specifies the main language of the application, in this case, Persian (`fa`).
|
||||||
|
|
||||||
|
## xlangs Table
|
||||||
|
|
||||||
|
The `xlangs` table stores essential information about each supported language in the application. Its structure includes:
|
||||||
|
|
||||||
|
### Fields
|
||||||
|
|
||||||
|
- **id**:
|
||||||
|
- A unique identifier for each language entry. This number is automatically generated and used as the primary key.
|
||||||
|
|
||||||
|
- **name**:
|
||||||
|
- A string field that describes the name of the language (e.g., "English", "فارسی").
|
||||||
|
|
||||||
|
- **tag**:
|
||||||
|
- A unique string field representing the language tag (e.g., `en`, `fa`). This tag is used for programmatic identification of the language.
|
||||||
|
|
||||||
|
- **rtl**:
|
||||||
|
- A boolean field that indicates whether the language is right-to-left (true) or left-to-right (false). This is particularly relevant for languages like Persian or Arabic.
|
||||||
|
|
||||||
|
- **is_default**:
|
||||||
|
- A boolean field to indicate if the language is the default language of the application. This should align with `XLANG_MAIN`, ensuring that the specified main language is correctly marked.
|
||||||
|
|
||||||
|
- **img**:
|
||||||
|
- An optional string field that can store the URL/path to a flag image representing the language, which can be displayed in the UI for language selection.
|
||||||
|
|
||||||
|
- **emoji**:
|
||||||
|
- An optional string field that can hold an emoji representation of the language, enhancing visual appeal and user experience.
|
||||||
|
|
||||||
|
- **sort**:
|
||||||
|
- A tiny integer field to define the order in which languages are displayed in listings, allowing customization of the language selection interface.
|
||||||
|
|
||||||
|
## Additional Features
|
||||||
|
|
||||||
|
The application also integrates artificial intelligence for translation purposes. You can leverage an API to translate the content of the website, ensuring that users can access information in their preferred language.
|
||||||
|
|
||||||
|
When a new language is added by the administrator, a corresponding JSON file must be created. The text in this file should be translated using AI or manually to ensure consistency and accuracy across the application. This streamlined approach facilitates quick integration of new languages while maintaining high-quality translations.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
This document outlines the multi-language configuration of the application, detailing both the configuration requirements and the structure of the `xlangs` table. It emphasizes the importance of supporting multiple languages and the functionalities offered by AI translation capabilities.
|
@ -0,0 +1 @@
|
|||||||
|
# xController
|
@ -0,0 +1 @@
|
|||||||
|
# Reports
|
@ -0,0 +1,97 @@
|
|||||||
|
# Seeding
|
||||||
|
|
||||||
|
## What is the Seeding System?
|
||||||
|
|
||||||
|
Seeding is a method to generate fake or sample data, allowing for an easier startup of your application.
|
||||||
|
|
||||||
|
## Default Seeder Details
|
||||||
|
|
||||||
|
The default seeders generate the following data:
|
||||||
|
|
||||||
|
- **Users**: 53 users (the first user is essential for login)
|
||||||
|
- **Groups**: 6 groups
|
||||||
|
- **Posts**: 55 posts
|
||||||
|
- **States & Cities**: 31 states and 1,111 cities for user location selection
|
||||||
|
- **Customers**: 35 customers
|
||||||
|
- **Categories**: 13 categories for digital products
|
||||||
|
- **Props or Properties**: 8 sample properties for the first and second categories
|
||||||
|
- **Products**: 31 products
|
||||||
|
- **Comments**: 55 sample comments associated with posts and products
|
||||||
|
- **Setting**: Various settings categorized into [General, SEO, Media, SMS, Theme] (this is an essential seeder)
|
||||||
|
- **GFX**: GFX seeder adds website graphic details (this is an essential seeder)
|
||||||
|
- **Area**: Areas designed for website sections needed for theme parts (this is an essential seeder)
|
||||||
|
- **Invoices**: 71 user invoices corresponding to orders based on products and customers
|
||||||
|
- **VisitorSeeder**: Generates fake website visit statistics
|
||||||
|
- **Transport Methods**: 2 transport methods
|
||||||
|
- **Menu**: One menu containing 4 items
|
||||||
|
- **Slider**: 3 slider items
|
||||||
|
- **Part**: The Part seeder is responsible for theme sections (if you disable this seeder, your website will lack design and require manual setup)
|
||||||
|
- **Evaluation**: Evaluations for the rating system
|
||||||
|
|
||||||
|
## How to Disable or Change Seeders
|
||||||
|
|
||||||
|
The main data seeder class is located in the `database/seeder/DataSeeder` directory. You can comment out specific seeders or modify them by accessing their respective sub-classes. For example, the `VisitorSeeder` can be adjusted like this:
|
||||||
|
|
||||||
|
```php
|
||||||
|
$this->call([
|
||||||
|
XLangSeeder::class,
|
||||||
|
UserSeeder::class,
|
||||||
|
GroupSeeder::class,
|
||||||
|
PostSeeder::class,
|
||||||
|
StateSeeder::class,
|
||||||
|
CustomerSeeder::class,
|
||||||
|
CategorySeeder::class,
|
||||||
|
PropSeeder::class,
|
||||||
|
ProductSeeder::class,
|
||||||
|
CommentSeeder::class,
|
||||||
|
SettingSeeder::class,
|
||||||
|
GfxSeeder::class,
|
||||||
|
AreaSeeder::class,
|
||||||
|
InvoiceSeeder::class,
|
||||||
|
VisitorSeeder::class,
|
||||||
|
TransportSeeder::class,
|
||||||
|
MenuSeeder::class,
|
||||||
|
SliderSeeder::class,
|
||||||
|
PartSeeder::class,
|
||||||
|
EvaluationSeeder::class,
|
||||||
|
]);
|
||||||
|
```
|
||||||
|
|
||||||
|
VisitorSeeder sample:
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function run(): void
|
||||||
|
{
|
||||||
|
//
|
||||||
|
Visitor::factory()->count(1250)->create();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Image seeding
|
||||||
|
|
||||||
|
- Download & prepare images
|
||||||
|
```bash
|
||||||
|
php artisan seeding:prepare
|
||||||
|
```
|
||||||
|
- nor copy your image folder to `database/seeders/images/`
|
||||||
|
- then: Seeding image for models: [`Group`, `Category`, `Post`, `Product`, `Slider`]
|
||||||
|
|
||||||
|
```bash
|
||||||
|
php artisan seeding:image Product digital
|
||||||
|
```
|
||||||
|
|
||||||
|
Or to seed all models:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
php artisan seeding:all digital
|
||||||
|
```
|
||||||
|
|
||||||
|
## Prepare and downloaded image repository
|
||||||
|
|
||||||
|
- The repository is https://github.com/A1Gard/xshop-installer-assets
|
||||||
|
- images from unsplash free license
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,91 @@
|
|||||||
|
# Users Model
|
||||||
|
|
||||||
|
The `Users` model is designed to manage user accounts within the system. It includes functionalities for user registration, authentication, and role management, ensuring that users have appropriate access to various features of the application.
|
||||||
|
|
||||||
|
## Users Table
|
||||||
|
|
||||||
|
### Fields
|
||||||
|
|
||||||
|
- **id**:
|
||||||
|
- A unique identifier for each user. This number is automatically generated by the system to distinguish each user record.
|
||||||
|
|
||||||
|
- **name**:
|
||||||
|
- A string field for the user's name. This is essential for personal identification within the system.
|
||||||
|
|
||||||
|
- **email**:
|
||||||
|
- A unique string field for the user's email address. This serves as the primary method for user identification and communication.
|
||||||
|
|
||||||
|
- **email_verified_at**:
|
||||||
|
- A timestamp that indicates when the user's email address was verified. This field can be null if the email has not been verified.
|
||||||
|
|
||||||
|
- **password**:
|
||||||
|
- A hashed string field to store the user's password securely.
|
||||||
|
|
||||||
|
- **mobile**:
|
||||||
|
- An optional string field for the user's mobile number, which can be used for additional authentication methods or notifications.
|
||||||
|
|
||||||
|
- **avatar**:
|
||||||
|
- A nullable string field that stores the URL or path to the user's avatar image.
|
||||||
|
|
||||||
|
- **role**:
|
||||||
|
- An enumerated field that defines the user's role within the system. Common roles include:
|
||||||
|
- **Developer**: Full access to all features of the application.
|
||||||
|
- **Admin**: Has administrative privileges but lacks access to settings for multilingual configurations and the design area.
|
||||||
|
- **User**: Standard user with minimal access; permissions must be granted post account creation.
|
||||||
|
|
||||||
|
- **rememberToken**:
|
||||||
|
- A field used for "remember me" sessions that allows users to stay logged in.
|
||||||
|
|
||||||
|
- **softDeletes**:
|
||||||
|
- This functionality allows for "soft deletion" of user records, meaning users can be marked as deleted without being permanently removed from the database.
|
||||||
|
|
||||||
|
## User Logging
|
||||||
|
|
||||||
|
The `admin_logs` table stores logs of user activities within the application. This feature provides insight into user actions, assisting with auditing and monitoring.
|
||||||
|
|
||||||
|
### Fields
|
||||||
|
|
||||||
|
- **id**:
|
||||||
|
- A unique identifier for each log entry.
|
||||||
|
|
||||||
|
- **user_id**:
|
||||||
|
- A foreign key that links each log entry to the corresponding user, establishing who performed the action.
|
||||||
|
|
||||||
|
- **action**:
|
||||||
|
- A string describing the action performed by the user (e.g., creating, updating, deleting an item).
|
||||||
|
|
||||||
|
- **loggable**:
|
||||||
|
- This field allows for polymorphic logging, meaning various entities can be referenced in the logs by relating them to the action performed.
|
||||||
|
|
||||||
|
## Access Control
|
||||||
|
|
||||||
|
The `accesses` table facilitates fine-grained access control through the Access Control Layer (ACL). This system determines which users have access to specific features and functionalities of the application.
|
||||||
|
|
||||||
|
### Fields
|
||||||
|
|
||||||
|
- **id**:
|
||||||
|
- A unique identifier for each access entry.
|
||||||
|
|
||||||
|
- **user_id**:
|
||||||
|
- A foreign key reference to the `users` table, linking each access entry to a specific user.
|
||||||
|
|
||||||
|
- **route**:
|
||||||
|
- A string representing the route or feature to which access is granted or denied. This feature centralizes control over various functionalities on the platform.
|
||||||
|
|
||||||
|
- **owner**:
|
||||||
|
- A boolean field that indicates whether the user is the owner of a specific resource, which may grant additional permissions.
|
||||||
|
|
||||||
|
## Role Descriptions
|
||||||
|
|
||||||
|
- **Developer**:
|
||||||
|
- Has 100% access to every aspect of the application and can manage all configurations, settings, and user permissions.
|
||||||
|
|
||||||
|
- **Admin**:
|
||||||
|
- Can manage most features but does not have access to the settings related to multilingual site configurations and does not have access to the design area.
|
||||||
|
|
||||||
|
- **User**:
|
||||||
|
- Initially has no access rights. Permissions must be explicitly granted after account creation, ensuring that only necessary access is provided.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
This document outlines the structure of the `Users` model and its related tables while detailing roles, logging, and access control mechanisms. The content is tailored to be informative and easily understandable for users and developers alike.
|
@ -0,0 +1,74 @@
|
|||||||
|
# State and City Models
|
||||||
|
|
||||||
|
The `State` and `City` models are designed to manage geographical data within your application. These models allow for the organization of locations, enabling functionalities related to regional management of users, services, or logistics.
|
||||||
|
|
||||||
|
## State Model
|
||||||
|
|
||||||
|
The `State` model represents a geographical region within a country and serves as a parent for the `City` model.
|
||||||
|
|
||||||
|
### Fields Description
|
||||||
|
|
||||||
|
### 1. `id`
|
||||||
|
- **Type:** Integer
|
||||||
|
- **Description:** A unique identifier for each state. This field is automatically generated and serves as the primary key for the model.
|
||||||
|
|
||||||
|
### 2. `name`
|
||||||
|
- **Type:** Text
|
||||||
|
- **Description:** The name of the state. This field is required.
|
||||||
|
|
||||||
|
### 3. `lat`
|
||||||
|
- **Type:** Double
|
||||||
|
- **Description:** The latitude coordinate of the state, which can be useful for mapping and geographical calculations.
|
||||||
|
|
||||||
|
### 4. `lng`
|
||||||
|
- **Type:** Double
|
||||||
|
- **Description:** The longitude coordinate of the state, complementing the latitude for precise geographical representation.
|
||||||
|
|
||||||
|
### 5. `country`
|
||||||
|
- **Type:** Text
|
||||||
|
- **Description:** The name of the country that the state belongs to. This field is essential for understanding the geographical context of the state.
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The `State` model provides a structured representation of states within a country, including essential geographical coordinates and country affiliation.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## City Model
|
||||||
|
|
||||||
|
The `City` model represents urban areas within a state and establishes a relationship with the `State` model.
|
||||||
|
|
||||||
|
### Fields Description
|
||||||
|
|
||||||
|
### 1. `id`
|
||||||
|
- **Type:** Integer
|
||||||
|
- **Description:** A unique identifier for each city. This field is automatically generated and serves as the primary key for the model.
|
||||||
|
|
||||||
|
### 2. `name`
|
||||||
|
- **Type:** Text
|
||||||
|
- **Description:** The name of the city. This field is required.
|
||||||
|
|
||||||
|
### 3. `lat`
|
||||||
|
- **Type:** Double (Nullable)
|
||||||
|
- **Description:** The latitude coordinate of the city, which can be useful for mapping and location services.
|
||||||
|
|
||||||
|
### 4. `lng`
|
||||||
|
- **Type:** Double (Nullable)
|
||||||
|
- **Description:** The longitude coordinate of the city, providing necessary details for accurate location mapping.
|
||||||
|
|
||||||
|
### 5. `state_id`
|
||||||
|
- **Type:** Unsigned Big Integer
|
||||||
|
- **Description:** The ID of the state to which this city belongs. This establishes a foreign key relationship with the `State` model, linking cities to their respective states.
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The `City` model complements the `State` model by providing a detailed structure for managing cities within specific states. It allows for clear organization of geographical data, essential for functionalities requiring location-based services.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Relationship Between State and City
|
||||||
|
|
||||||
|
- Each `State` can have multiple associated `City` records, establishing a one-to-many relationship.
|
||||||
|
- The `City` model includes a foreign key (`state_id`) that links each city to its respective state.
|
||||||
|
|
||||||
|
By integrating the `State` and `City` models, your application can effectively manage geographical data, facilitating the organization of regional information for users and services.
|
@ -0,0 +1,132 @@
|
|||||||
|
# Customer Model
|
||||||
|
|
||||||
|
The `Customer` model is designed to manage customer information in your application. It stores essential personal information and enables various functionalities related to customer accounts.
|
||||||
|
|
||||||
|
## Fields Description
|
||||||
|
|
||||||
|
### 1. `id`
|
||||||
|
- **Type:** Integer
|
||||||
|
- **Description:** A unique identifier for each customer. This field is automatically generated and serves as the primary key for the model.
|
||||||
|
|
||||||
|
### 2. `name`
|
||||||
|
- **Type:** String (Max Length: 255) (Nullable)
|
||||||
|
- **Description:** The full name of the customer. This field is optional and can be left blank.
|
||||||
|
|
||||||
|
### 3. `email`
|
||||||
|
- **Type:** String (Unique) (Nullable)
|
||||||
|
- **Description:** The email address of the customer. This field must be unique and is used for authentication and communication purposes.
|
||||||
|
|
||||||
|
### 4. `email_verified_at`
|
||||||
|
- **Type:** Timestamp (Nullable)
|
||||||
|
- **Description:** This field stores the timestamp when the customer's email address was verified. It can be `NULL` until verified.
|
||||||
|
|
||||||
|
### 5. `password`
|
||||||
|
- **Type:** String (Nullable)
|
||||||
|
- **Description:** The customer's hashed password for authentication. This field is optional and can be set during account creation.
|
||||||
|
|
||||||
|
### 6. `mobile`
|
||||||
|
- **Type:** String (Max Length: 15) (Unique) (Nullable)
|
||||||
|
- **Description:** The mobile phone number of the customer. This field must be unique and is optional.
|
||||||
|
|
||||||
|
### 7. `dob`
|
||||||
|
- **Type:** Date (Nullable)
|
||||||
|
- **Description:** The date of birth of the customer. This field is optional and can be left blank.
|
||||||
|
|
||||||
|
### 8. `sms`
|
||||||
|
- **Type:** String (Max Length: 10) (Nullable)
|
||||||
|
- **Description:** This field stores the last authentication code sent via SMS for verification purposes.
|
||||||
|
|
||||||
|
### 9. `code`
|
||||||
|
- **Type:** String (Max Length: 10) (Nullable)
|
||||||
|
- **Description:** A field that can be used for various purposes, including managing verification codes or promotions.
|
||||||
|
|
||||||
|
### 10. `colleague`
|
||||||
|
- **Type:** Boolean
|
||||||
|
- **Description:** Indicates whether the customer is a colleague (true/false). The default value is `false`.
|
||||||
|
|
||||||
|
### 11. `description`
|
||||||
|
- **Type:** Text (Nullable)
|
||||||
|
- **Description:** Additional details about the customer, meant for administrative purposes.
|
||||||
|
|
||||||
|
### 12. `credit`
|
||||||
|
- **Type:** Big Integer
|
||||||
|
- **Description:** This field tracks the customer's credit balance within the system. It allows for dynamic credit management based on orders and refunds. The default value is `0`.
|
||||||
|
|
||||||
|
### 13. `sex`
|
||||||
|
- **Type:** Enum (Options: `MALE`, `FEMALE`) (Nullable)
|
||||||
|
- **Description:** The gender of the customer. This field is optional.
|
||||||
|
|
||||||
|
### 14. `height`
|
||||||
|
- **Type:** Integer (Nullable)
|
||||||
|
- **Description:** The height of the customer in centimeters. This field is optional.
|
||||||
|
|
||||||
|
### 15. `weight`
|
||||||
|
- **Type:** Decimal (Nullable)
|
||||||
|
- **Description:** The weight of the customer in kilograms. This field is optional.
|
||||||
|
|
||||||
|
### 16. `avatar`
|
||||||
|
- **Type:** String (Nullable)
|
||||||
|
- **Description:** The file path or URL to the customer's avatar image. This field is optional.
|
||||||
|
|
||||||
|
### 17. `card`
|
||||||
|
- **Type:** JSON (Nullable)
|
||||||
|
- **Description:** This field stores the customer's bank card number and related information in a JSON format. It is optional.
|
||||||
|
|
||||||
|
### 18. `rememberToken`
|
||||||
|
- **Type:** String
|
||||||
|
- **Description:** This field is used for "remember me" functionality during authentication, storing a token for persistent login.
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The `Customer` model provides a detailed and organized structure for managing customer information, including personal details, login credentials, and financial data. It supports functionalities such as credit management and SMS verification.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Address Model
|
||||||
|
|
||||||
|
The `Address` model is designed to manage multiple addresses associated with each customer. It allows for the storage of detailed address information, including geographical coordinates and postal codes.
|
||||||
|
|
||||||
|
## Fields Description
|
||||||
|
|
||||||
|
### 1. `id`
|
||||||
|
- **Type:** Integer
|
||||||
|
- **Description:** A unique identifier for each address. This field is automatically generated and serves as the primary key for the model.
|
||||||
|
|
||||||
|
### 2. `address`
|
||||||
|
- **Type:** Text
|
||||||
|
- **Description:** The full address of the customer. This field is required and stores detailed address information.
|
||||||
|
|
||||||
|
### 3. `customer_id`
|
||||||
|
- **Type:** Unsigned Big Integer
|
||||||
|
- **Description:** The ID of the customer associated with this address. This establishes a relationship between the `Address` and `Customer` models.
|
||||||
|
|
||||||
|
### 4. `lat`
|
||||||
|
- **Type:** Double (Nullable)
|
||||||
|
- **Description:** The latitude coordinate of the address, useful for map integrations. This field is optional.
|
||||||
|
|
||||||
|
### 5. `lng`
|
||||||
|
- **Type:** Double (Nullable)
|
||||||
|
- **Description:** The longitude coordinate of the address, useful for map integrations. This field is optional.
|
||||||
|
|
||||||
|
### 6. `state_id`
|
||||||
|
- **Type:** Unsigned Big Integer (Nullable)
|
||||||
|
- **Description:** The ID of the state associated with the address. This field can be set to `NULL` if not applicable.
|
||||||
|
|
||||||
|
### 7. `city_id`
|
||||||
|
- **Type:** Unsigned Big Integer (Nullable)
|
||||||
|
- **Description:** The ID of the city associated with the address. This field can also be set to `NULL`.
|
||||||
|
|
||||||
|
### 8. `data`
|
||||||
|
- **Type:** JSON (Nullable)
|
||||||
|
- **Description:** This field can store any additional, custom data related to the address in JSON format, providing flexibility in data management.
|
||||||
|
|
||||||
|
### 9. `zip`
|
||||||
|
- **Type:** String (Nullable)
|
||||||
|
- **Description:** The postal code for the address. This field is optional and can be used for shipping and verification purposes.
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
The `Address` model enhances the `Customer` model by allowing customers to store multiple addresses with detailed information. This setup supports various functionalities such as shipping and billing address management, which can be crucial for e-commerce applications.
|
||||||
|
|
||||||
|
---
|
||||||
|
By integrating the `Customer` and `Address` models into your application, you can establish comprehensive customer management, ensuring efficient handling of personal and logistical information.
|
@ -0,0 +1,85 @@
|
|||||||
|
# Props Model & meta
|
||||||
|
|
||||||
|
The `Props` model is designed to define various properties that can be associated with products. These properties enhance the characterization of products, enabling users to filter, search, and understand product attributes effectively. Each property can influence inventory management as well.
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
- **id**:
|
||||||
|
- A unique identifier for each property entry. This number is automatically generated by the system to ensure every property can be distinguished from one another.
|
||||||
|
|
||||||
|
- **name**:
|
||||||
|
- The name of the property, which serves as a key identifier. It must be unique and should not contain spaces, numbers, or special characters. Once selected, the name cannot be changed. This feature ensures consistency and eases the management of properties.
|
||||||
|
|
||||||
|
- **label**:
|
||||||
|
- A descriptive label for the property. This name is displayed to users to provide a clear understanding of what the property represents.
|
||||||
|
|
||||||
|
- **width**:
|
||||||
|
- This field specifies the Bootstrap grid size for displaying the property input field. The default value is set to `col-md-6`, allowing for flexible layout in user interfaces.
|
||||||
|
|
||||||
|
- **required**:
|
||||||
|
- A boolean field indicating whether this property is mandatory for product listings. By default, it is set to `false`, meaning the property is optional.
|
||||||
|
|
||||||
|
- **searchable**:
|
||||||
|
- This boolean field determines if the property can be used in search filters. By default, it is set to `true`, allowing users to search for products based on this property.
|
||||||
|
|
||||||
|
- **type**:
|
||||||
|
- Specifies the input type for the property. The user can select from the following options:
|
||||||
|
- **text**: A standard text input.
|
||||||
|
- **number**: An input for numeric values.
|
||||||
|
- **checkbox**: A boolean option that can be either checked or unchecked.
|
||||||
|
- **color**: A color selection input.
|
||||||
|
- **select**: A dropdown menu for selecting one option.
|
||||||
|
- **multi**: Allows selecting multiple options at once.
|
||||||
|
- **singlemulti**: One value is registered during submission, but allows for multiple selections during search.
|
||||||
|
- **date**: A date input.
|
||||||
|
- **time**: A time input.
|
||||||
|
|
||||||
|
- **unit**:
|
||||||
|
- This field indicates the measurement unit for the property (e.g., weight measured in grams). It provides clarity when defining the context of the property.
|
||||||
|
|
||||||
|
- **sort**:
|
||||||
|
- An unsigned integer that determines the order in which properties are displayed. This field is optional and can be left null.
|
||||||
|
|
||||||
|
- **options**:
|
||||||
|
- A long text field that can contain predefined options for selection-type properties, such as those configured for the `select` input type. This allows for the creation of dropdown menus with specific choices.
|
||||||
|
|
||||||
|
- **priceable**:
|
||||||
|
- A boolean field indicating whether this property can affect pricing. It is set to `false` by default.
|
||||||
|
|
||||||
|
- **icon**:
|
||||||
|
- A string that specifies an optional icon associated with the property. This can enhance the user interface by providing visual cues.
|
||||||
|
|
||||||
|
## Metadata Storage
|
||||||
|
|
||||||
|
Unlike traditional models, the `Props` model does not have a pivot table. Instead, when creating or updating a product, properties can be assigned as metadata using the following command:
|
||||||
|
|
||||||
|
```php
|
||||||
|
$product->syncMeta(json_decode($request->get('meta', '[]'), true));
|
||||||
|
```
|
||||||
|
|
||||||
|
This method allows for the dynamic association of properties without requiring an intermediary table.
|
||||||
|
|
||||||
|
## Quantities Model
|
||||||
|
|
||||||
|
The `Quantities` model is used to manage stock levels for products but will not be elaborated much here. The key takeaway is that properties are stored in the `Quantities` model as JSON, which influences inventory management and related data.
|
||||||
|
|
||||||
|
### Fields
|
||||||
|
|
||||||
|
- **product_id**:
|
||||||
|
- The unique identifier for the product being tracked in terms of quantity.
|
||||||
|
|
||||||
|
- **count**:
|
||||||
|
- An unsigned integer that indicates the available stock count, defaulting to zero.
|
||||||
|
|
||||||
|
- **price**:
|
||||||
|
- An unsigned integer for the product price, allowing for financial tracking.
|
||||||
|
|
||||||
|
- **image**:
|
||||||
|
- This field can store image references for the product and is nullable.
|
||||||
|
|
||||||
|
- **data**:
|
||||||
|
- Designed to hold additional information or metadata in JSON format, this field is optional and can be left empty.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
This structure outlines the `Props` and `Quantities` models, emphasizing how properties enhance product details and influence inventory management. The document is designed to be straightforward and comprehensive for users without a technical background.
|
@ -0,0 +1,39 @@
|
|||||||
|
# xShop
|
||||||
|
|
||||||
|
> xShop is an open source shop developed in laravel, very customizable! Easy site design.
|
||||||
|
> By the way is very fast development.
|
||||||
|
> Support multilanguage sites [RTL & LTR support]
|
||||||
|
|
||||||
|
## Table of the contents
|
||||||
|
|
||||||
|
- [Introduction](1-introduction.md)
|
||||||
|
- [Environment file](2-environment-file.md)
|
||||||
|
- [Seeding](3-seeding.md)
|
||||||
|
- [Post](4-post.md)
|
||||||
|
- [Group](5-group.md)
|
||||||
|
- [State and City](6-state-city.md)
|
||||||
|
- [Customer](7-customer.md)
|
||||||
|
- [Category](8-category.md)
|
||||||
|
- [Property](9-prop.md)
|
||||||
|
- [Product](10-product.md)
|
||||||
|
- [Interaction](11-interaction.md)
|
||||||
|
- [Setting](12-setting.md)
|
||||||
|
- [GFX](13-gfx.md)
|
||||||
|
- [Area](14-area.md)
|
||||||
|
- [Invoice](15-invoice.md)
|
||||||
|
- [Transport](16-transport.md)
|
||||||
|
- [Menu](17-menu.md)
|
||||||
|
- [Slider](18-slider.md)
|
||||||
|
- [Evaluation](19-evaluation.md)
|
||||||
|
- [Discount](20-discount.md)
|
||||||
|
- [Gallery](21-gallery.md)
|
||||||
|
- [Clip](22-clip.md)
|
||||||
|
- [Advertise](23-advertise.md)
|
||||||
|
- [Attachment](24-attachment.md)
|
||||||
|
- [Tag](25-tag.md)
|
||||||
|
- [SEO](26-seo.md)
|
||||||
|
- [Multi Language](27-multi-lang.md)
|
||||||
|
- [XController](28-xconttroler.md)
|
||||||
|
- [Report](29-report.md)
|
||||||
|
- [Command Middleware](30-command-middleware.md)
|
||||||
|
- [User](31-user.md)
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
|||||||
|
!function(e){var n=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,t="(?:"+r.source+"(?:[ \t]+"+n.source+")?|"+n.source+"(?:[ \t]+"+r.source+")?)",a="(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*".replace(/<PLAIN>/g,(function(){return"[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]"})),d="\"(?:[^\"\\\\\r\n]|\\\\.)*\"|'(?:[^'\\\\\r\n]|\\\\.)*'";function o(e,n){n=(n||"").replace(/m/g,"")+"m";var r="([:\\-,[{]\\s*(?:\\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\\]|\\}|(?:[\r\n]\\s*)?#))".replace(/<<prop>>/g,(function(){return t})).replace(/<<value>>/g,(function(){return e}));return RegExp(r,n)}e.languages.yaml={scalar:{pattern:RegExp("([\\-:]\\s*(?:\\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\\S[^\r\n]*(?:\\2[^\r\n]+)*)".replace(/<<prop>>/g,(function(){return t}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp("((?:^|[:\\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\\s*:\\s)".replace(/<<prop>>/g,(function(){return t})).replace(/<<key>>/g,(function(){return"(?:"+a+"|"+d+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ \t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?"),lookbehind:!0,alias:"number"},boolean:{pattern:o("false|true","i"),lookbehind:!0,alias:"important"},null:{pattern:o("null|~","i"),lookbehind:!0,alias:"important"},string:{pattern:o(d),lookbehind:!0,greedy:!0},number:{pattern:o("[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)","i"),lookbehind:!0},tag:r,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(Prism);
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,25 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>xShop v2 document</title>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||||
|
<meta name="description" content="Description">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
|
||||||
|
<link rel="stylesheet" href="assets/vue.css">
|
||||||
|
<link rel="stylesheet" href="assets/dark.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="app"></div>
|
||||||
|
<script>
|
||||||
|
window.$docsify = {
|
||||||
|
name: 'xShop',
|
||||||
|
repo: 'https://github.com/4xmen/xshop'
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<!-- Docsify v4 -->
|
||||||
|
<script src="assets/docsify@4.js"></script>
|
||||||
|
<script src="assets/prism-bash.min.js"></script>
|
||||||
|
<script src="assets/prism-php.min.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue