first commit
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?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
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user