Connect AdSense over OAuth, sync entities and daily reports locally, and show placement performance in the admin panel without calling the Management API from public pages.
34 lines
643 B
PHP
34 lines
643 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
final class AdsenseEntity extends Model
|
|
{
|
|
public const TYPE_AD_UNIT = 'ad_unit';
|
|
|
|
public const TYPE_CUSTOM_CHANNEL = 'custom_channel';
|
|
|
|
protected $fillable = [
|
|
'account_resource_name',
|
|
'ad_client_resource_name',
|
|
'type',
|
|
'resource_name',
|
|
'reporting_dimension_id',
|
|
'display_name',
|
|
'active',
|
|
'last_seen_at',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'active' => 'boolean',
|
|
'last_seen_at' => 'datetime',
|
|
];
|
|
}
|
|
}
|