add show package guest route and add null on delete to package_id column for items table just in case.

This commit is contained in:
Moradi
2025-04-09 10:49:21 +03:30
parent 4f25abbf36
commit ac19e51d28
2 changed files with 2 additions and 1 deletions
@@ -15,7 +15,7 @@ class UpdateItemsTable4 extends Migration
{
Schema::drop('item_package');
Schema::table('items', function (Blueprint $table) {
$table->unsignedBigInteger('package_id')->nullable()->after("id");
$table->unsignedBigInteger('package_id')->nullable()->after("id")->nullOnDelete();
});
}
+1
View File
@@ -91,6 +91,7 @@ Route::middleware('auth:api')->group(function () {
});
Route::get('/show-item/{Item}',[ItemController::class, 'show'])->middleware('guest');
Route::get('/show-package/{Item}',[PackageController::class, 'show'])->middleware('guest');
Route::post('/BarCode/{Code}/{Type?}', [BarCodeController::class, 'generateBarcode']);
Route::post('Package/Barcode/{Code}', [BarCodeController::class, 'generatePackageBarcode']);
Route::post('Package/QRCode/{Package}', [BarCodeController::class, 'generatePackageQRCode']);