-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModel.php
More file actions
33 lines (25 loc) · 809 Bytes
/
Model.php
File metadata and controls
33 lines (25 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
// Import additionnal class into the global namespace
use \LaswitchTech\Core\Abstracts\Model;
class LibraryModel extends Model {
public function fetch(): array
{
// Initialize the Result
$result = [];
// List of Libraries
$libraries = ['countries','states','industries','tags','currencies'];
// Loop through the Libraries
foreach($libraries as $library){
// Create the Query
$Query = $this->Database->query()
->table($library)
->select('*')
->where('id', 9999, '<>')
->where('name', '', '<>');
// Retrieve the Results
$result[$library] = $Query->fetch();
}
// Return the Results
return $result;
}
}