Created
June 4, 2014 18:54
-
-
Save JesseObrien/2732e45340348b563f21 to your computer and use it in GitHub Desktop.
Add soft delete traits to every PHP file in a directory.
This file contains 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
#!/usr/bin/env bash | |
sed -i 's/<?php\(.*\)/<?php\1\n\nuse Illuminate\Database\Eloquent\SoftDeletingTrait;/' *.php | |
sed -i 's/class \(.*\) {/class \1 {\n\n\tuse SoftDeletingTrait;/' *.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment