PMCORE-3845 Check and made the recommend changes in the Laravel upgrade guide

This commit is contained in:
Roly Gutierrez
2022-06-09 11:12:28 -04:00
committed by Mauricio Veliz
parent 6d1d7d752e
commit d0c5a23d67
10 changed files with 140 additions and 99 deletions

View File

@@ -2,8 +2,9 @@
namespace App\Providers;
use App\Helpers\Workspace;
use App\Console\Commands\WorkCommand;
use App\Log\LogManager;
use Illuminate\Queue\Worker;
use Illuminate\Support\Facades\App;
use Illuminate\Support\ServiceProvider;
@@ -17,8 +18,11 @@ class AppServiceProvider extends ServiceProvider
*/
public function register()
{
App::bind('workspace', function() {
return new Workspace();
$this->app->bind(WorkCommand::class, function ($app) {
$isDownForMaintenance = function () {
return $this->app->isDownForMaintenance();
};
return new WorkCommand(App::make(Worker::class, ['isDownForMaintenance' => $isDownForMaintenance]), $app['cache.store']);
});
$this->app->singleton('log', function ($app) {