Files
webproxyscan/app/Models/Proxy.php
T

38 lines
651 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'
];
protected $casts = [
'https' => 'boolean',
'port' => 'integer',
'score' => 'integer'
];
public function getGeolocationAttribute()
{
return [
'country' => $this->country,
'city' => $this->city
];
}
}