Discuz! Board

 找回密碼
 立即註冊
搜索
熱搜: 活動 交友 discuz
查看: 15|回復: 0
打印 上一主題 下一主題

The application is built using the following

[複製鏈接]

1

主題

0

好友

20

積分

实习

Rank: 1

該用戶從未簽到

跳轉到指定樓層
樓主
發表於 2023-12-26 14:26:47 |只看該作者 |倒序瀏覽
How to use the loading and manipulation functions to build a simple blogging application. You will be adding a database and an existing application that currently only stores data in memory.  technologies As a framework for migrations and queries As a programming language As a database Prerequisites To successfully complete this guide you need to install. If it's your editor you can install extensions to improve the developer experience by adding syntax highlighting, formatting and autocomplete on schema files. Set up your starter project first navigate to a directory of your choice and run the following commands to clone the repository copy install dependencies and start the application copy amazing your application should be running on. The starting project has the following folder structure. Currently the project uses dummy data in a file to display published posts on a route and unpublished posts on a route.


You currently cannot view indi photo editing servies vidual posts and register as a user or create draft post. You will use the functions and to implement these functions later in this guide. Addi  tionally you will replace fetching data from dummy data with a database. Now it’s time to get started with the setup. First use the following command to install the development dependencies. Copy the load function to provide data when rendering the component. The loading function performs the request to the route. For this project you will implement the following load function Route description with load function Get all published posts Get all draft posts Get all published posts by getting a single post Create a file inside the folder and add the following code Copy the above function Do the following using options to query all published posts including their authors. Currently the client is still using dummy data from the database.



Replace the code with the following to correct this issue Copy the response returned from the load function answer. Iterates through the list of values subsequently displayed through the component. You can try this further by adding a post and setting the published property to . It should appear as part of the published post on the route. Get all draft posts Create a file inside the folder and add the following code Copy the function above Do the following Query all unpublished posts including their author relationship. Return object response. Similar to the previous step you will connect the client to the database instead of the file. Replace the existing code with the following code to copy the response returned from the load function. Iterates through the list of values subsequently displayed through the component. To get a single post, create a file inside the folder and add the following code. Copy .
回復

使用道具 舉報

高級模式
B Color Image Link Quote Code Smilies |上傳

QQ|雲端vps主機|免費論壇|联系QQ799984224|Archiver|交流论坛

GMT+8, 2024-12-26 00:40 , Processed in 0.995592 second(s), 22 queries .

抗攻擊 by GameHost X2.5 Licensed

© 2001-2012 Comsenz Inc.

回頂部 一粒米 | 中興米 | 論壇美工 | 設計 抗ddos | 天堂私服 | ddos | ddos | 防ddos | 防禦ddos | 防ddos主機 | 天堂美工 | 設計 防ddos主機 | 抗ddos主機 | 抗ddos | 抗ddos主機 | 抗攻擊論壇 | 天堂自動贊助 | 免費論壇 | 天堂私服 | 天堂123 | 台南清潔 | 天堂 | 天堂私服 | 免費論壇申請 | 抗ddos | 虛擬主機 | 實體主機 | vps | 網域註冊 | 抗攻擊遊戲主機 | ddos |