https://github.com/recca0120/eloquent-logrotate
laravel eloquent auto create table by daily or weekly or monthly or yearly
https://github.com/recca0120/eloquent-logrotate
daily eloquent laravel logrotate model monthly yearly
Last synced: 23 days ago
JSON representation
laravel eloquent auto create table by daily or weekly or monthly or yearly
- Host: GitHub
- URL: https://github.com/recca0120/eloquent-logrotate
- Owner: recca0120
- License: mit
- Created: 2018-01-13T15:18:23.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-09T04:53:13.000Z (over 7 years ago)
- Last Synced: 2025-03-29T23:32:10.473Z (about 2 months ago)
- Topics: daily, eloquent, laravel, logrotate, model, monthly, yearly
- Language: PHP
- Homepage:
- Size: 26.4 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Eloquent Logrotate
[](https://styleci.io/repos/40661503)
[](https://travis-ci.org/recca0120/eloquent-logrotate)
[](https://packagist.org/packages/recca0120/eloquent-logrotate)
[](https://packagist.org/packages/recca0120/eloquent-logrotate)
[](https://packagist.org/packages/recca0120/eloquent-logrotate)
[](https://packagist.org/packages/recca0120/eloquent-logrotate)
[](https://packagist.org/packages/recca0120/eloquent-logrotate)
[](https://packagist.org/packages/recca0120/eloquent-logrotate)
[](https://scrutinizer-ci.com/g/recca0120/eloquent-logrotate/?branch=master)
[](https://scrutinizer-ci.com/g/recca0120/eloquent-logrotate/?branch=master)## INSTALL
```bash
composer require recca0120/eloquent-logrotate
```## HOW TO USE
### define model
```php
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