no message

This commit is contained in:
StudioTem committed 2024-05-09 14:47:38 +02:00
1 parent 7b5528ea51
commit 1fd4524890
3 files changed
+96 -34

No files matched your search

@@ -0,0 +1,37 @@
<?php
namespace App\Console\Commands;
use App\Services\Karat\KaratService;
use Illuminate\Console\Command;
class SyncProjectsNameFromKarat extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'karat:sync-projects-name';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Syncs projects name from Karat to our DB';
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$karatService = new KaratService();
$karatService->syncProjectsName();
return Command::SUCCESS;
}
}
+3 -2
View File
@@ -11,6 +11,7 @@ class Kernel extends ConsoleKernel
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
*
* @return void
*/
protected function schedule(Schedule $schedule)
@@ -28,9 +29,9 @@ class Kernel extends ConsoleKernel
$schedule->command('karat:sync-users')->daily();
$schedule->command('karat:sync-clients')->hourly();
$schedule->command('karat:sync-projects')->everyFiveMinutes();
$schedule->command('karat:sync-projects-name')->hourly();
$schedule->command('karat:sync-timesheets')->everyFiveMinutes();
}
}
/**
@@ -40,7 +41,7 @@ class Kernel extends ConsoleKernel
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');
$this->load(__DIR__ . '/Commands');
require base_path('routes/console.php');
}