2021-10-28 22:35:15 +02:00
|
|
|
<?php namespace Zoomyboy\Social\Models;
|
|
|
|
|
|
|
|
use Model;
|
2021-10-30 12:16:27 +02:00
|
|
|
use Zoomyboy\Social\Classes\FacebookService;
|
|
|
|
use Zoomyboy\Social\Classes\InstagramService;
|
2021-10-28 22:35:15 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Setting Model
|
|
|
|
*/
|
|
|
|
class Setting extends Model
|
|
|
|
{
|
|
|
|
public $implement = ['System.Behaviors.SettingsModel'];
|
|
|
|
|
|
|
|
public $settingsCode = 'zoomyboy_social';
|
|
|
|
|
|
|
|
public $settingsFields = 'fields.yaml';
|
|
|
|
|
2021-10-30 12:16:27 +02:00
|
|
|
public function getFacebookPagesOptions(): array
|
2021-10-28 22:35:15 +02:00
|
|
|
{
|
2021-10-30 13:32:09 +02:00
|
|
|
return app(FacebookService::class)->pages()->pluck('name', 'id')->toArray();
|
2021-10-28 22:35:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getInstagramUsersOptions(): array
|
|
|
|
{
|
2021-10-30 13:32:09 +02:00
|
|
|
return app(InstagramService::class)->pages()->pluck('name', 'id')->toArray();
|
2021-10-28 22:35:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|