Initial commit

This commit is contained in:
Ronald Huynen
2026-03-23 21:37:59 +01:00
commit 2547717edb
2193 changed files with 972171 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
<?php
namespace App\Console\Commands;
use App\Events\Test_UserLangChangedEvent;
use App\Models\User;
use Illuminate\Console\Command;
use Illuminate\Support\Arr;
class Test_ChangeUserLang extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'user:lang';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Change user language with a public channel';
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$user = User::find(2);
$lang = [
'nl',
'en',
'fr',
'es',
'de',
'it',
];
$user->update([
'locale' => Arr::random($lang),
]);
Test_UserLangChangedEvent::dispatch($user);
return 0;
}
}