30 lines
608 B
PHP
30 lines
608 B
PHP
<?php
|
|
|
|
namespace WoWPress\Models;
|
|
|
|
use Wenprise\Eloquent\Model;
|
|
use WoWPress\Api\BattleNet;
|
|
|
|
class Raid extends Model
|
|
{
|
|
|
|
protected $table = "wowpress_raids";
|
|
public $timestamps = false;
|
|
protected $primaryKey = 'ID';
|
|
protected $guarded = ['ID'];
|
|
|
|
public function __construct($attrs = [])
|
|
{
|
|
parent::__construct($attrs);
|
|
$options = get_option('wowpress_api');
|
|
if(isset($options['bnet'])){
|
|
$key = get_option('wowpress_api')['wowaudit']['key'];
|
|
}else{
|
|
return false;
|
|
}
|
|
|
|
$this->api = new BattleNet(null,$key);
|
|
}
|
|
|
|
|
|
} |