Download the PHP package ismayil-dev/epoch-softdelete without Composer

On this page you can find all versions of the php package ismayil-dev/epoch-softdelete. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package epoch-softdelete

Epoch SoftDelete

A Laravel package that introduces epoch-based soft deletes to handle unique constraints in multi-tenant applications. This package works seamlessly with Laravel's SoftDeletes trait, allowing you to enforce unique constraints while using soft deletes without conflicts.

๐Ÿš€ Features

๐Ÿ“Œ Requirements

๐Ÿ“ฅ Installation

You can install the package via Composer:

โš™๏ธ Configuration

Step 1. Register the Service Provider\ After installing the package, you need to manually register the service provider in your Laravel app.\ Open config/app.php and add the following line inside the providers array:

Step 2. Adjust your deleted_at column:\ For new projects, you can use the built-in macro for migrations:

Step 3. Apply the EpochSoftDeletes trait:\ In your models, use the EpochSoftDeletes trait instead of the default SoftDeletes trait:

Step 4. Run migrations:\ After modifying your migration files, run the migration to update the database schema:

๐Ÿ›  Usage

Once configured, continue using Laravelโ€™s soft delete functionality as usual โ€” no extra changes needed!

๐Ÿ“Œ deleted_at Auto-Casting

When retrieving soft-deleted models, the deleted_at column automatically casts to a Carbon instance, making it easier to work with. This means you can perform all Carbon operations on deleted_at just like in Laravelโ€™s default soft deletes. ๐ŸŽฏ

โš™๏ธ Handling Existing Projects

If you're integrating Epoch SoftDelete into an existing project, you must update your existing data before changing the column type.

Steps to Migrate Existing Projects

1. Convert existing deleted_at values:\

If a record has a deleted_at date, convert it to an epoch timestamp.\ If deleted_at is NULL, update it to 0 to indicate the record is not deleted.

2. Update your database schema:\

Modify the deleted_at column to be an integer (epoch timestamp) instead of timestamp or NULL.

3. Apply the EpochSoftDeletes trait in your model.

4. Run migrations to finalize the changes.

โš ๏ธ Important: If you do not convert your existing deleted_at values before running migrations, queries may not work as expected.

๐ŸŽฏ Why Use This Package?

๐Ÿ“ข Contributing

We welcome contributions! ๐ŸŽ‰

If you find a bug, have a feature request, or want to improve the package:

Before submitting a PR:

Feel free to contribute and help improve Epoch SoftDelete! ๐Ÿš€

๐Ÿ“œ License

This package is open-sourced software licensed under the MIT license.


All versions of epoch-softdelete with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0|^11.0
illuminate/database Version ^10.0|^11.0
laravel/serializable-closure Version ^1.3|^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ismayil-dev/epoch-softdelete contains the following files

Loading the files please wait ....