Skip to content

Commit

Permalink
Merge pull request #25 from paulredmond/paulredmond-patch-1
Browse files Browse the repository at this point in the history
Readme Code Example Formatting
  • Loading branch information
michaeldyrynda authored Apr 25, 2018
2 parents 74ae3c8 + 8d5c8cb commit 7e80178
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ class Post extends Model

protected $cascadeDeletes = ['comments'];

protected $dates = ['deleted_at'];
protected $dates = ['deleted_at'];

public function comments()
{
return $this->hasMany(Comment::class);
}
}
}
```

Now you can delete an `App\Post` record, and any associated `App\Comment` records will be deleted. If the `App\Comment` record implements the `CascadeSoftDeletes` trait as well, it's children will also be deleted and so on.
Expand Down

0 comments on commit 7e80178

Please sign in to comment.