osb/app/Models/External/Integrations.php

27 lines
406 B
PHP
Raw Normal View History

2019-06-12 06:25:15 +00:00
<?php
namespace App\Models\External;
use Illuminate\Database\Eloquent\Model;
2021-06-29 03:18:52 +00:00
use App\Models\User;
2019-06-12 06:25:15 +00:00
class Integrations extends Model
{
public $table = 'external_integrations';
public function user()
{
return $this->belongsTo(User::class);
}
function scopeActive()
{
return $this->where('active',TRUE);
}
function scopeType($query,string $type)
{
return $query->where('type',$type);
}
}