Javatpoint Logo
Javatpoint Logo

Delete Record

To delete records in the database, following these steps. We have named our Yii2 folder as delete.

Step 1 Create Model file

Create a model file child.php in frontend/models folder.

Step 2 Create action in controllers

Create an action actionDelete in ChildController.php file.

Step 3 Run it

Run it on the browser.

http://localhost/delete/frontend/web/index.php?r=child%2Findex

YII Delete record 1

Look at the above snapshot, click the Delete option in the last row of the table.

Look at the above snapshot, respective row is deleted from the table.

YII Delete record 2
Next TopicYII Sessions




Help Others, Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA