27 lines
406 B
PHP
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);
|
|
}
|
|
} |