1
0
mirror of https://github.com/cp6/my-idlers.git synced 2024-11-18 00:13:12 +01:00
my-idlers/app/Models/IPs.php
cp6 e15b317bb4 Updated servers for new IP CRUD
Updated servers for new IP CRUD
2022-02-22 13:30:39 +11:00

25 lines
502 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class IPs extends Model
{
use HasFactory;
public $table = 'ips';
protected $fillable = ['id', 'active', 'service_id', 'address', 'is_ipv4'];
public $incrementing = false;
public static function deleteIPsAssignedTo($service_id)
{
DB::table('ips')->where('service_id', '=', $service_id)->delete();
}
}