Total Complexity | 2 |
Total Lines | 61 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class FamilyEvent extends Event |
||
10 | { |
||
11 | use SoftDeletes; |
||
12 | use TableCache; |
||
13 | // public function __construct(Array $attributes = []) |
||
14 | // { |
||
15 | // parent::__construct($attributes); |
||
16 | // $db = \Session::get('db'); |
||
17 | // error_log('+++FamilyEvent++++++++++++++++++++++++++++++++'.$db); |
||
18 | // if(empty($db)) { |
||
19 | // $db = env('DB_DATABASE', 'enso'); |
||
20 | // } |
||
21 | // if($db === env('DB_DATABASE')) { |
||
22 | // $key = 'database.connections.mysql.database'; |
||
23 | // config([$key => $db]); |
||
24 | // } else { |
||
25 | // $key = 'database.connections.mysql.database'; |
||
26 | // config([$key => $db]); |
||
27 | // } |
||
28 | // \DB::purge('mysql'); |
||
29 | // \DB::reconnect('mysql'); |
||
30 | // $this->setConnection('mysql'); |
||
31 | // error_log('-----------------------------------'.$this->getConnection()->getDatabaseName()); |
||
32 | // } |
||
33 | /** |
||
34 | * The attributes that should be mutated to dates. |
||
35 | * |
||
36 | * @var array |
||
37 | */ |
||
38 | protected $dates = ['deleted_at']; |
||
39 | |||
40 | protected $table = 'family_events'; |
||
41 | |||
42 | protected $fillable = [ |
||
43 | 'family_id', |
||
44 | 'places_id', |
||
45 | 'date', |
||
46 | 'title', |
||
47 | 'description', |
||
48 | 'year', |
||
49 | 'month', |
||
50 | 'day', |
||
51 | 'type', |
||
52 | 'plac', |
||
53 | 'phon', |
||
54 | 'caus', |
||
55 | 'age', |
||
56 | 'husb', |
||
57 | 'wife', |
||
58 | ]; |
||
59 | |||
60 | public static function boot() |
||
65 | } |
||
66 | |||
67 | public function family() |
||
72 |