composer require recca0120/eloquent-logrotate
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