Skip to content

Instantly share code, notes, and snippets.



Last active Apr 30, 2021
What would you like to do?
Aliases to clear Laravel logs
# Must run from the root of a Laravel app
alias clearlog="truncate -s 0 $PWD/storage/logs/laravel.log"
alias clearlogs="truncate -s 0 $PWD/storage/logs/*.log"
# Or using git rev-parse
alias clearlog="truncate -s 0 $(git rev-parse --show-toplevel)/storage/logs/laravel.log"
alias clearlogs="truncate -s 0 $(git rev-parse --show-toplevel)/storage/logs/*.log"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment