X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FConsole%2FCommands%2FChatlibDatabase.php;fp=app%2FConsole%2FCommands%2FChatlibDatabase.php;h=13c881a902a5589a8b31849c422dbf4259dbbf4a;hb=771f1761f0abec996838c0ccc71cec0219bad71a;hp=0000000000000000000000000000000000000000;hpb=76e2a3da33fc0cccbdb8864416bbb2a8684987ab;p=alttp.git diff --git a/app/Console/Commands/ChatlibDatabase.php b/app/Console/Commands/ChatlibDatabase.php new file mode 100644 index 0000000..13c881a --- /dev/null +++ b/app/Console/Commands/ChatlibDatabase.php @@ -0,0 +1,52 @@ +whereNotNull('evaluated_at') + ->chunk(500, function ($msgs) use ($db) { + foreach ($msgs as $msg) { + $db->addMessage($msg); + } + }); + + $db->compile(); + + for ($i = 0; $i < 50; ++$i) { + $this->line($db->generate()); + } + + return 0; + } + +} + +?>