LaravelPackages.net
Acme Inc.
Toggle sidebar
recca0120/eloquent-logrotate

laravel eloquent auto create table by daily or weekly or monthly or yearly

8
4
v1.0.4
About recca0120/eloquent-logrotate

recca0120/eloquent-logrotate is a Laravel package for laravel eloquent auto create table by daily or weekly or monthly or yearly. It currently has 4 GitHub stars and 8 downloads on Packagist (latest version v1.0.4). Install it with composer require recca0120/eloquent-logrotate. Discover more Laravel packages by recca0120 or browse all Laravel packages to compare alternatives.

Last updated

Eloquent Logrotate

StyleCI Build Status Total Downloads Latest Stable Version Latest Unstable Version License Monthly Downloads Daily Downloads Scrutinizer Code Quality Code Coverage

INSTALL

composer require recca0120/eloquent-logrotate

HOW TO USE

define model

namespace App;

use Illuminate\Database\Eloquent\Model;
use Recca0120\EloquentLogrotate\Logrotate;

class MonthlyLog extends Model
{
    use Logrotate;

    /**
     * $logrotateType: hourly, daily, weekly, monthly, yearly
     */
    protected $logrotateType = 'monthly';

    protected function logrotateTableSchema($table)
    {
        $table->increments('id');
        $table->string('name');
        $table->string('email')->unique();
        $table->string('password');
        $table->timestamps();
    }
}

it will create database by monthly

Comments