| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function run() |
||
| 18 | { |
||
| 19 | Model::unguard(); |
||
| 20 | |||
| 21 | $model = new VueOpd; |
||
| 22 | $file = file_get_contents(public_path('json/bantenprov/vue-opd/vue-opd-data.json')); |
||
| 23 | $json = json_decode($file, true); |
||
| 24 | $vue_opds = array_get($json, '2.data'); |
||
| 25 | |||
| 26 | $model::truncate(); |
||
| 27 | |||
| 28 | DB::table($model->getTable())->insert( |
||
| 29 | $vue_opds |
||
| 30 | ); |
||
| 31 | } |
||
| 32 | } |
||
| 33 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.