osb/app/Models/External/Integrations.php
2021-06-29 16:40:54 +10:00

27 lines
406 B
PHP

<?php
namespace App\Models\External;
use Illuminate\Database\Eloquent\Model;
use App\Models\User;
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);
}
}