]> _ Git - fluidbook-toolbox.git/commitdiff
wait #7902 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 16 Dec 2025 10:06:15 +0000 (11:06 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 16 Dec 2025 10:06:15 +0000 (11:06 +0100)
app/Console/Commands/HemsleyListAllFluidbooks.php [new file with mode: 0644]

diff --git a/app/Console/Commands/HemsleyListAllFluidbooks.php b/app/Console/Commands/HemsleyListAllFluidbooks.php
new file mode 100644 (file)
index 0000000..24ab4ed
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+
+namespace App\Console\Commands;
+
+use Cubist\Util\Files\Files;
+use Illuminate\Console\Command;
+
+class HemsleyListAllFluidbooks extends Command
+{
+    protected $signature = 'hemsleyfraser:listallfluidbooks';
+
+    public function handle()
+    {
+        $fluidbooks = \App\Models\FluidbookPublication::where('invoicable_company', 1880)->orderBy('id', 'ASC')->get();
+        $csv = '#;Title' . "\r\n";
+        foreach ($fluidbooks as $fluidbook) {
+            $csv .= $fluidbook->id . ';"' . utf8_decode($fluidbook->c_title) . '"' . "\r\n";
+        }
+        file_put_contents(Files::mkdir(protected_path('hemsleyfraser')) . 'allfluidbook.csv', $csv);
+
+    }
+}