Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Trash Cleaner Laravel Package

omaralalwi/laravel-trash-cleaner

View on GitHub
Deep Wiki
Context7

Laravel Trash Cleaner

Laravel Trash Cleaner is a lightweight and powerful utility package that helps you keep your Laravel application clean and performant by:

  • ๐Ÿงน Deleting debug and log files (Clockwork, Debugbar).
  • โšก Clearing compiled view caches and frontend build directories.
  • ๐Ÿ› ๏ธ Optionally rebuilding frontend assets using tools like npm, yarn, or pnpm.

Trash Cleaner Screenshot

Trash Assets Cleaner Screenshot


๐Ÿš€ Installation

Install the package via Composer:

composer require omaralalwi/laravel-trash-cleaner

๐Ÿ”ง Publish Configuration

Optionally, publish the configuration file to customize paths and build settings:

php artisan vendor:publish --tag=laravel-trash-cleaner

๐Ÿงน Usage

๐Ÿ”ธ Clean Debug Files

Cleans out storage/debugbar and storage/clockwork folders with a progress bar:

php artisan trash:clean

๐Ÿ”ธ Clean Asset Folders

Removes frontend-related build caches and compiled view files based on your config:

php artisan trash:clean-assets

๐Ÿ”ธ Clean + Rebuild Frontend (Optional)

Use the --build flag to also run your frontend build steps (npm install && npm run build or equivalent):

php artisan trash:clean-assets --build

This is ideal for resetting the build process after switching branches, clearing corrupted caches, or deploying updates.


customize Assets paths & commnds

Note: You can fully customize the asset cleanup paths and build commands in the configuration file. For example, if you're using pnpm instead of the default npm, make sure to update the config key to 'package_manager' => 'pnpm'.


โฐ Scheduling Automatic Cleanup

To automate cleanup using Laravel's scheduler:

  1. Enable it in your config:
'schedule' => true,
'frequency' => 'daily',
  1. Ensure Laravel's scheduler is running via cron:
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1

๐Ÿค Contributing

Contributions are welcome! Please see CONTRIBUTING for details.


๐Ÿ›ก๏ธ Security

If you discover any security vulnerabilities, please contact: omaralwi2010@gmail.com


๐Ÿ“„ License

Licensed under the MIT License.


๐Ÿ“š Helpful Open Source Packages

  • Lexi Translate simplify managing translations for multilingual Eloquent models with power of morph relationships and caching .

  • Gpdf Open Source HTML to PDF converter for PHP & Laravel Applications, supports Arabic content out-of-the-box and other languages..

  • laravel Taxify Laravel Taxify provides a set of helper functions and classes to simplify tax (VAT) calculations within Laravel applications.

  • laravel Deployer Streamlined Deployment for Laravel and Node.js apps, with Zero-Downtime and various environments and branches.

  • laravel Time Craft simple trait and helper functions that allow you, Effortlessly manage date and time queries in Laravel apps.

  • Laravel Startkit Laravel Admin Dashboard, Admin Template with Frontend Template, for scalable Laravel projects.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope