Download the PHP package nexusbrother/laravel-archivable without Composer

On this page you can find all versions of the php package nexusbrother/laravel-archivable. 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 laravel-archivable

Laravel Archivable

Laravel Archivable 是一个数据库记录归档扩展包,能够将过期记录从主库自动迁移到独立的归档数据库,同时保持表结构同步。

功能特性

安装

发布配置文件:

配置

1. 数据库连接

config/database.phpconnections 中添加 archive 连接:

2. 环境变量

3. 配置项

config/archive.php

使用方法

1. 基于日期字段归档(DateFieldArchivable)

适合按时间归档的场景,所有记录归档到同一张目标表

2. 按月分表归档(MonthlyArchivable)

适合日志、消息等按月分区的数据,每个月的记录归档到独立的月表(如 logs_202501logs_202502):

3. 自定义归档条件(Archivable)

完全自定义归档逻辑:

命令行

表结构同步

归档前先同步表结构,确保归档表存在且字段一致:

数据归档

执行时会显示实时进度条:

编程方式使用

事件

归档完成后触发 ModelsArchived 事件:

定时任务

包内置两个定时任务,在 config('archive.enable')true 时自动注册:

任务 默认时间 说明
model:archive-structure-sync 09:00 同步所有 Archivable 模型的归档表结构
model:archive 09:10 执行数据归档

两个任务均配置了 onOneServer()withoutOverlapping(),适合多服务器部署。

系统要求

许可证

MIT License


All versions of laravel-archivable with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
laravel/framework Version ^9.0|^10.0|^11.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 nexusbrother/laravel-archivable contains the following files

Loading the files please wait ...