feat: add site visit tracking middleware and admin dashboard stats
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class DailySiteView
|
||||
*
|
||||
* @property int $id
|
||||
* @property Carbon $view_date
|
||||
* @property int $views_count
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class DailySiteView extends Model
|
||||
{
|
||||
protected $table = 'daily_site_views';
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $casts = [
|
||||
'view_date' => 'datetime',
|
||||
'views_count' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'view_date',
|
||||
'views_count'
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user