32 lines
645 B
PHP
32 lines
645 B
PHP
<?php namespace Zoomyboy\Social\Models;
|
|
|
|
use Model;
|
|
|
|
/**
|
|
* Setting Model
|
|
*/
|
|
class Setting extends Model
|
|
{
|
|
public $implement = ['System.Behaviors.SettingsModel'];
|
|
|
|
public $settingsCode = 'zoomyboy_social';
|
|
|
|
public $settingsFields = 'fields.yaml';
|
|
|
|
public function getSynchedPagesOptions(): array
|
|
{
|
|
return Page::get()->pluck('name', 'id')->toArray();
|
|
}
|
|
|
|
public static function synchedPages(): array
|
|
{
|
|
return (new static([]))->getSynchedPagesOptions();
|
|
}
|
|
|
|
public function getInstagramUsersOptions(): array
|
|
{
|
|
return InstagramUser::get()->pluck('name', 'id')->toArray();
|
|
}
|
|
|
|
}
|