HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/MdnDirecteur/hours.komma.cloud/app/Console/Commands/autoGenerateBalances.php
<?php

namespace App\Console\Commands;

use App\Komma\Commands\CommandsService;
use App\Komma\Projects\Project;
use Illuminate\Console\Command;
use Carbon\Carbon;

class autoGenerateBalances extends Command
{
    protected $commandsService;


    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'auto-generate:balances';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Auto generate balances every year';


    public function __construct(CommandsService $commandsService)
    {
        parent::__construct();
        $this->commandsService = $commandsService;
    }

    /**
     * Execute the command.
     *
     * @return void 
     */
    public function handle()
    {
        $this->commandsService->autoGenerateBalances(Carbon::now()->addYear()->format('Y'));
    }
}