feat: implement interactive product storefront with cart, filtering, and dark mode support
This commit is contained in:
parent
8609c68a6d
commit
544afe7334
@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Services\Master;
|
||||
|
||||
use App\Jobs\SendPushNotificationJob;
|
||||
use App\Models\Category;
|
||||
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
@ -34,12 +33,7 @@ public function paginateForIndex(array $tableQuery): LengthAwarePaginator
|
||||
*/
|
||||
public function create(array $validated): void
|
||||
{
|
||||
$category = Category::create($validated);
|
||||
|
||||
SendPushNotificationJob::dispatch(
|
||||
'📦 Kategori Baru',
|
||||
"Kategori '{$category->name}' telah ditambahkan.",
|
||||
);
|
||||
Category::create($validated);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -48,22 +42,11 @@ public function create(array $validated): void
|
||||
public function update(Category $category, array $validated): void
|
||||
{
|
||||
$category->fill($validated)->save();
|
||||
|
||||
SendPushNotificationJob::dispatch(
|
||||
'✏️ Kategori Diperbarui',
|
||||
"Kategori '{$category->name}' telah diperbarui.",
|
||||
);
|
||||
}
|
||||
|
||||
public function delete(Category $category): void
|
||||
{
|
||||
$name = $category->name;
|
||||
$category->delete();
|
||||
|
||||
SendPushNotificationJob::dispatch(
|
||||
'🗑️ Kategori Dihapus',
|
||||
"Kategori '{$name}' telah dihapus.",
|
||||
);
|
||||
}
|
||||
|
||||
private function applySorting(Builder $query, string $sort, string $direction): void
|
||||
|
||||
Loading…
Reference in New Issue
Block a user