PHP code example of recca0120 / eloquent-logrotate
1. Go to this page and download the library: Download recca0120/eloquent-logrotate library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
recca0120 / eloquent-logrotate example snippets
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();
}
}