Skip to content

Commit e978bd2

Browse files
committed
added jsondata model to have global access to json
1 parent c628be6 commit e978bd2

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

ProcessMaker/Models/JsonData.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace ProcessMaker\Models;
4+
use Illuminate\Database\Eloquent\Model;
5+
6+
/**
7+
* Application Data
8+
*
9+
* @package ProcessMaker\Models
10+
*/
11+
class JsonData extends Model
12+
{
13+
public static function timezones(){
14+
$temp = json_decode(file_get_contents('../resources/js/data/timeszones.json'), true);
15+
$timezones=[];
16+
foreach($temp['data'] as $t){
17+
$timezones[$t['value']] = $t['content'];
18+
}
19+
return $timezones;
20+
}
21+
}
22+
23+
24+

0 commit comments

Comments
 (0)