From 397f789976f320644f2643ae93e47b3b5bd3befd Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 18 Dec 2025 17:54:42 +0100 Subject: [PATCH] wip #7904 @0.5 --- app/Http/Controllers/Admin/PublishController.php | 2 ++ app/PdfFile.php | 2 +- .../2021_01_13_000535_add_sends_pdf_to_collection.php | 2 +- .../2025_12_18_152837_add_batch_uuid_column_to_pdf_files.php | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Admin/PublishController.php b/app/Http/Controllers/Admin/PublishController.php index 8f9a06c..ca4f82c 100644 --- a/app/Http/Controllers/Admin/PublishController.php +++ b/app/Http/Controllers/Admin/PublishController.php @@ -78,6 +78,8 @@ class PublishController extends Controller // dispatch($pdfProcessEmailBatch->withFile()); // } + + return ['data' => $batch->id]; } diff --git a/app/PdfFile.php b/app/PdfFile.php index 4967a51..4973546 100644 --- a/app/PdfFile.php +++ b/app/PdfFile.php @@ -108,7 +108,7 @@ class PdfFile extends TwillModel implements Sortable /** @var PdfFile $pdfFile */ $pdfFile = self::query()->updateOrCreate([ 'slug' => Str::slug("{$collection->slug}_{$ref}"), - 'published' => 0, + 'published' => 1, 'collection_id' => $collection_id, ], [ diff --git a/database/migrations/2021_01_13_000535_add_sends_pdf_to_collection.php b/database/migrations/2021_01_13_000535_add_sends_pdf_to_collection.php index 51e3d51..bcdc74a 100644 --- a/database/migrations/2021_01_13_000535_add_sends_pdf_to_collection.php +++ b/database/migrations/2021_01_13_000535_add_sends_pdf_to_collection.php @@ -27,7 +27,7 @@ class AddSendsPdfToCollection extends Migration public function down() { Schema::table('collections', function (Blueprint $table) { - $table->boolean('sends_pdf')->default(0); + $table->dropColumn('sends_pdf'); }); } } diff --git a/database/migrations/2025_12_18_152837_add_batch_uuid_column_to_pdf_files.php b/database/migrations/2025_12_18_152837_add_batch_uuid_column_to_pdf_files.php index 6ff20b4..cb73283 100644 --- a/database/migrations/2025_12_18_152837_add_batch_uuid_column_to_pdf_files.php +++ b/database/migrations/2025_12_18_152837_add_batch_uuid_column_to_pdf_files.php @@ -14,7 +14,7 @@ class AddBatchUUIDColumnToPdfFiles extends Migration public function up() { Schema::table('pdf_files', function (Blueprint $table) { - $table->text('batch_uuid'); + $table->text('batch_uuid')->default(''); }); } -- 2.39.5