From 507b655c94dd21a3f00ae078c9e9bd5ba64aebb4 Mon Sep 17 00:00:00 2001 From: A1Gard Date: Mon, 24 Jun 2024 06:04:51 +0330 Subject: [PATCH] fixed restore annd trashed bug for product --- app/Models/Quantity.php | 3 ++- routes/web.php | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Models/Quantity.php b/app/Models/Quantity.php index 6475d18..92e262a 100644 --- a/app/Models/Quantity.php +++ b/app/Models/Quantity.php @@ -4,8 +4,9 @@ namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\SoftDeletes; class Quantity extends Model { - use HasFactory; + use HasFactory,SoftDeletes; } diff --git a/routes/web.php b/routes/web.php index 93279bb..8997c1c 100644 --- a/routes/web.php +++ b/routes/web.php @@ -140,7 +140,10 @@ Route::prefix(config('app.panel.prefix'))->name('admin.')->group( Route::get('edit/{item}', [\App\Http\Controllers\Admin\ProductController::class, 'edit'])->name('edit'); Route::post('update/{item}', [\App\Http\Controllers\Admin\ProductController::class, 'update'])->name('update'); Route::get('delete/{item}', [\App\Http\Controllers\Admin\ProductController::class, 'destroy'])->name('destroy'); + Route::get('restore/{item}', [\App\Http\Controllers\Admin\ProductController::class, 'restore'])->name('restore'); Route::post('bulk', [\App\Http\Controllers\Admin\ProductController::class, "bulk"])->name('bulk'); + Route::get('trashed', [\App\Http\Controllers\Admin\ProductController::class, "trashed"])->name('trashed'); + }); Route::prefix('props')->name('prop.')->group( function () {