alarm messages
This commit is contained in:
1 parent
5a35b90b0d
commit
004e87e6b5
16 files changed
+452
-28
No files matched your search
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class OddsName extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'alarm',
|
||||
'table',
|
||||
'bettype',
|
||||
];
|
||||
}
|
||||
@@ -6,6 +6,26 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class OddsTable extends Model
|
||||
{
|
||||
// public static function tmp()
|
||||
// {
|
||||
// $res = OddsTable::get();
|
||||
// $arr = [];
|
||||
// foreach ($res as $value) {
|
||||
// $names = explode(',', $value->oddnames);
|
||||
// $fields = explode(',', $value->fieldnames);
|
||||
// $base = [];
|
||||
// $base['table'] = $value->name;
|
||||
// $base['bettype'] = $value->fulltitle;
|
||||
// $tmp = array_combine($fields, $names);
|
||||
// foreach ($tmp as $alarm => $name) {
|
||||
// $base['name'] = $name;
|
||||
// $base['alarm'] = $alarm;
|
||||
// $arr[] = $base;
|
||||
// }
|
||||
// }
|
||||
// return $arr;
|
||||
// }
|
||||
|
||||
public static function oddnames()
|
||||
{
|
||||
$res = OddsTable::get();
|
||||
@@ -20,6 +40,37 @@ class OddsTable extends Model
|
||||
return $arr;
|
||||
}
|
||||
|
||||
public static function alarm_fieldnames_by_sport()
|
||||
{
|
||||
$arr = [];
|
||||
$arr[1] = [];
|
||||
$arr[2] = [];
|
||||
$arr[3] = [];
|
||||
$arr[5] = [];
|
||||
|
||||
$res = OddsTable::get();
|
||||
foreach ($res as $value) {
|
||||
$fields = explode(',', $value->fieldnames);
|
||||
|
||||
$selectfields = implode("'", $fields);
|
||||
|
||||
if ($value->soccer == 1) {
|
||||
$arr[1] = array_merge($arr[1], $fields);
|
||||
}
|
||||
if ($value->icehockey == 1) {
|
||||
$arr[2] = array_merge($arr[2], $fields);
|
||||
}
|
||||
if ($value->basketball == 1) {
|
||||
$arr[3] = array_merge($arr[3], $fields);
|
||||
}
|
||||
if ($value->tennis == 1) {
|
||||
$arr[5] = array_merge($arr[5], $fields);
|
||||
}
|
||||
}
|
||||
|
||||
return $arr;
|
||||
}
|
||||
|
||||
public static function fields()
|
||||
{
|
||||
$res = OddsTable::get();
|
||||
|
||||
@@ -6,5 +6,13 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class PersonalNotificationSend extends Model
|
||||
{
|
||||
//
|
||||
protected $fillable = [
|
||||
'event_id',
|
||||
'user_id',
|
||||
'bookmaker_id',
|
||||
'alarm_level_id',
|
||||
'fieldname',
|
||||
'notify_by_system',
|
||||
'notify_by_email',
|
||||
];
|
||||
}
|
||||
Reference in new issue
Block a user