Files
webproxyscan/app/Models/Proxy.php
T

40 lines
717 B
PHP
Raw Normal View History

2025-03-30 19:37:01 +03:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Proxy extends Model
{
use HasFactory;
protected $fillable = [
'proxy',
'protocol',
'ip',
'port',
'https',
'anonymity',
'score',
'country',
'city',
'last_tested_at'
2025-03-30 19:37:01 +03:00
];
protected $casts = [
'https' => 'boolean',
'port' => 'integer',
'score' => 'integer',
'last_tested_at' => 'datetime'
2025-03-30 19:37:01 +03:00
];
public function getGeolocationAttribute()
{
return [
'country' => $this->country,
'city' => $this->city
];
}
}