## Module 2: Understand the Basic Functions of the Laravel Application

In this module, we will walk through the basic functions of a simple book shop website built on Laravel and Aurora (MySQL).

### Step 1. Understand the book purchase function

+ Click [Book List](${LAB:HTTPS_REVERSE_PROXY_URL}?next=${LAB:"/vscode/proxy/8000/products"|urlencode} "Book List") to view the "Book List", select a book, and click the "View" button to "Product Details" page to see the book details.

![204_2_1_1.png 85%](https://lab-static.pingcap.com/images/2026/1/22/c265af0fd42bb8e6f50a04e905520e434531101f.png)

+ On the "Product Details" page, select the Quantity (limitation is between 1 to 10), and also select a Payment Method, such as "COD", to purchase and click the "Buy Now" button to purchase the book.

![204_2_1_3.png 85%](https://lab-static.pingcap.com/images/2026/1/22/8a7502dc957024ff4a3eae7e1f4b437ecc328565.png)

+ Receive the successful purchase confirmation, and click the "All Orders" button to view all orders for the user.

![204_2_1_4.png 85%](https://lab-static.pingcap.com/images/2026/1/22/d2c0f036a3808c699cfaec7430f42bec1265805b.png)

+ View all historical orders, and click the "Back" button to go back to the "Book List" page.

![204_2_1_5.png 85%](https://lab-static.pingcap.com/images/2026/1/22/1f65703798b6b114a315490dd89c4f3606b1460c.png)

+ Return to the "Book List" page to complete a shopping process.

![204_2_1_6.png 85%](https://lab-static.pingcap.com/images/2026/1/22/657ff77ded7af83388eac2a87b0e12681ca7274a.png)

+ Please close the "Book List" page and move to the next step.

### Step 2. New book creation

+ Click [Book Creation](${LAB:HTTPS_REVERSE_PROXY_URL}?next=${LAB:"/vscode/proxy/8000/products/create"|urlencode} "Book Creation") to open the New Book page, start filling in the book information and select the book cover.

![204_2_2_2.png 85%](https://lab-static.pingcap.com/images/2026/1/23/0eb3c90b3812d6a0725e8b1472ec249776fd02b5.png)

+ Fill in the book information provided below, and click the "UPDATE" button to add the new book to the inventory.
  + `STATUS`: On Sale
  + `CATEGORY`: Comics
  + `NAME`: Wishing Well
  + `BLURB`: Be careful about what you wish for in this dark fantasy anthology where dreams are granted with a brutal twist.
  + `PRICE`: 166.09
  + `QUANTITY`: 77
  + `COVER`(You can use the image below by downloading and then uploading it.):

![204_2_2_2.png 85%](https://lab-static.pingcap.com/images/2026/1/8/d7d8411abf94e90f6e722b5bbbcbf6d9fb295c74.png)

+ The Website page looks like:

![204_2_2_3.png 85%](https://lab-static.pingcap.com/images/2026/1/22/6fac3025bdbfa958070663de5a8fce7c1dca8edc.png)

+ After the new book is created, you are redirected to the "Book Management" page, where you can see the newly created book record.

![204_2_2_4.png 85%](https://lab-static.pingcap.com/images/2026/1/22/22d08f69edd8afebfc08655931174f327449bdf0.png)

+ Please close the "Book Management" page and move to the next step.

### Step 3. Delete a book

+ Click [Book Management](${LAB:HTTPS_REVERSE_PROXY_URL}?next=${LAB:"/vscode/proxy/8000/products/manage"|urlencode} "Book Management") to open the "Book Management" page, select the book inventory to delete, and click the "Delete" button on the far right.

![204_2_3_1.png 85%](https://lab-static.pingcap.com/images/2026/1/22/f408e68e321685a39a77083531c5cd7c4a66c053.png)

+ A prompt will ask, "Are you sure you want to delete this book?". And select "Confirm".

![204_2_3_2.png 70%](https://lab-static.pingcap.com/images/2026/1/22/e6b5c8779cb57ca3376af93b3d123fd23663aa84.png)

+ The page automatically redirects to the "Book Management" page, and the book is found to have been removed from the inventory.

![204_2_3_3.png 85%](https://lab-static.pingcap.com/images/2026/1/22/dc1a245ca5377dac28700c9a251430968853f55c.png)

+ Please close the "Book Management" page and move to the next step.

### Step 4. Update book information

+ Click [Book Management](${LAB:HTTPS_REVERSE_PROXY_URL}?next=${LAB:"/vscode/proxy/8000/products/manage"|urlencode} "Book Management") to open the "Book Management" page, select the book record, for instance the book name is _Waterfalls_ to update, and click the "Edit" button.

![204_2_4_1.png 85%](https://lab-static.pingcap.com/images/2026/1/22/890d6d359e7eac0c75c6feba6d3eb956d3b5d844.png)

+ Modify the book price value from 74.95 to 77.77. And you also can change other items of the book including the cover.

![204_2_4_2.png 85%](https://lab-static.pingcap.com/images/2026/1/22/f57de83ba184e052644e82e55519fa7b489c51f1.png)

+ After the modification is complete, click the "UPDATE" button to confirm.

![204_2_4_3.png 85%](https://lab-static.pingcap.com/images/2026/1/22/5c0bcf65807c69b3bcce760947de0a2a14459f58.png)

+ Return to the "Book Management" page to confirm the price has been modified.

![204_2_4_4.png 85%](https://lab-static.pingcap.com/images/2026/1/22/4cec36888422b3cf9984d47a1f1a7de004b2a26e.png)

+ Please close the "Book Management" page.

### Step 5. Stop the Laravel application

+ In the VS Code terminal, type `Ctrl + C` to stop the current Laravel application from running.

+ Proceed to the next module.
