bespoke-support/created-updated-deleted-bundle
created_at, updated_at, and deleted_at timestamps to entities. Laravel’s Eloquent ORM already includes these fields natively via timestamps() and softDeletes() methods, making this package redundant for most Laravel use cases.timestamps(), softDeletes()).symfony/http-foundation), explore partial integration, but this is complex and non-standard.timestamps(), softDeletes()).timestamps() or softDeletes()?
spatie/laravel-activitylog or custom traits could replace this functionality.symfony/console, symfony/http-foundation) in Laravel, this bundle might integrate via a custom service provider, but this is non-standard and risky.doctrine/dbal), the bundle’s Doctrine event listeners could theoretically be adapted, but this requires significant refactoring.created_at, updated_at, or deleted_at are already implemented (Laravel default).// Model.php
use Illuminate\Database\Eloquent\Model;
class Post extends Model {
use SoftDeletes; // For deleted_at
public $timestamps = true; // For created_at/updated_at
}
// app/Traits/SoftTimestamps.php
trait SoftTimestamps {
protected static function bootSoftTimestamps() {
static::creating(function ($model) {
$model->created_at = now();
});
static::updating(function ($model) {
$model->updated_at = now();
});
}
}
symfony/flex to integrate Symfony components, then adapt the bundle.Model::observe or Model::dispatching), requiring rewrites.monolog/monolog (v1) vs. Laravel’s monolog/monolog (v2+).spatie/laravel-activitylog offer maintained alternatives for audit trails.timestamps() is optimized for performance.created_at, updated_at, and deleted_at columns. Laravel’s SoftDeletes and timestamps() do the same, so no additional schema changes are needed.SoftTimestamps trait to models requires clear usage guidelines.withTrashed() queries).How can I help you explore Laravel packages today?