<?php

namespace App\Http\Controllers;

use Brian2694\Toastr\Facades\Toastr;

use Illuminate\Support\Facades\Artisan;


class ArtisanController extends Controller
{
    public function optimizeClear()
    {
        Artisan::call('optimize:clear');
        $output = Artisan::output();
        Toastr::success('Optimize Clear Successfully Done', 'Success');
        return redirect()->back();
    }

    public function optimize()
    {
        Artisan::call('optimize');
        $output = Artisan::output();
        Toastr::success('Optimize Successfully Done', 'Success');
        return redirect()->back();
    }
}
