承接 maryamfadhillah/soft-delete-extra 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

maryamfadhillah/soft-delete-extra

最新稳定版本:v1.0.0

Composer 安装命令:

composer require maryamfadhillah/soft-delete-extra

包简介

Laravel package for extended soft delete with deleted_by

README 文档

README

A simple Laravel package that override the default SoftDeletes functionality by adding custom fields such as is_deleted and deleted_by without keeping deleted_at from Laravel's native implementation.

Features

  • Automatically fills:
    • is_deleted → mark row as deleted (1 = deleted, 0 = active).
    • deleted_by → stores the user ID who deleted the record.
  • Can be reused across multiple models using a single trait.

Requirement

  • PHP 8.0
  • Laravel 10

Installation

  1. Install via Composer:
composer require maryamfadhillah/soft-delete-extra
  1. Add the trait to your Model
use Illuminate\Database\Eloquent\Model;
use App\Traits\SoftDeleteExtra;

class Product extends Model
{
    use SoftDeleteExtra;

    protected $fillable = [
        'name',
        'deleted_by',
        'is_deleted',
        // ...
    ];
}

Database Requirement

Make sure your table contains the following columns in addition to your normal fields:

ALTER TABLE products
ADD deleted_by INT NULL,
ADD is_deleted TINYINT DEFAULT 0;

Usage

It's completely the same as Laravel's Soft Delete.

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2025-09-20