Working with relational removals by yii2
model, relations, remove, delete
This tutorial shows you how to safely
and safely remove relationship
s between relationships
and multiple lines.
First we create three tables using a Many to Many relationship.
[...]![Imagem da relacao](http://github.com/androidealp/Tutoriais/blob/master/yii-trabalhando-com-remocoes-relacionais/relacao-exemplo.jpg?raw=true "Image relation")
** Important: Apply casca
e to foreign key
feature will allow you to remove the foreign keys along with the line you want to delete
. This is very useful not to pollute your code.
ql the ralation has.
public function actionDeleteTheRelation($id)