'object', 'logic' => 'object' ]; protected $dispatchesEvents = [ 'created' => FormIntegrationCreated::class, ]; /** * Relationships */ public function form() { return $this->belongsTo(Form::class); } public function events() { return $this->hasMany(FormIntegrationsEvent::class, 'integration_id'); } public function provider() { return $this->belongsTo(OAuthProvider::class, 'oauth_id'); } public static function getAllIntegrations() { return json_decode(file_get_contents(resource_path('data/forms/integrations.json')), true); } public static function getIntegration($key) { return self::getAllIntegrations()[$key] ?? null; } }