Created
September 4, 2018 07:06
-
-
Save rajucs/e9691f8e98aefa4a3cc5d78e50905be5 to your computer and use it in GitHub Desktop.
laravel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Model::destroy($id); | |
| model2::where('model_id/foreign_key',$id)->delete(); | |
| model3::where('model_id/foreign_key',$id)->delete(); | |
| Here Model lis related with Model 2 and Model 3.The relationship build with one to many. | |
| If model id delete than others two relational data will be delete; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment