PHP code example of ez-it-solutions / app-cleanup

1. Go to this page and download the library: Download ez-it-solutions/app-cleanup library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ez-it-solutions / app-cleanup example snippets




namespace Ez_IT_Solutions\AppCleanup;

use Illuminate\Support\ServiceProvider;
use Ez_IT_Solutions\AppCleanup\Commands\AppCleanup;

class AppCleanupServiceProvider extends ServiceProvider
{
    public function boot()
    {
        if ($this->app->runningInConsole()) {
            $this->commands([
                AppCleanup::class,
            ]);
        }
    }

    public function register()
    {
        //
    }
}

namespace Ez_IT_Solutions\AppCleanup\Commands;

$commands = [
    'Clear Route Cache' => 'route:clear',
    'Clear Configuration Cache' => 'config:clear',
    // Add or remove commands here
];

$this->info('╔═════════════════════════════════════════════════╗');
$this->info('║                                                 ║');
$this->info('║         YOUR CUSTOM HEADER HERE                 ║');
$this->info('║                                                 ║');
$this->info('╚═════════════════════════════════════════════════╝');

protected $signature = 'your:command-name {--force : Force the operation without confirmation}';

app-cleanup/
├── src/
│   └── Commands/
│       └── AppCleanup.php
├── composer.json
├── LICENSE
└── README.md
bash
php artisan app:cleanup
bash
php artisan app:cleanup --force