Skip to content

Commit b0132a3

Browse files
committed
Merge branch 'master' of github.com:mevdschee/php-crud-api
2 parents 9251ef4 + 5844c74 commit b0132a3

File tree

2 files changed

+48
-2
lines changed

2 files changed

+48
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,10 +1090,11 @@ NB: Any non-error response will have status: 200 OK
10901090

10911091
I am testing mainly on Ubuntu and I have the following test setups:
10921092

1093-
- (Docker) Debian 10 with PHP 7.3, MariaDB 10.3, PostgreSQL 11.4 (PostGIS 2.5)
1094-
- (Docker) Debian 9 with PHP 7.0, MariaDB 10.1, PostgreSQL 9.6 (PostGIS 2.3)
10951093
- (Docker) Ubuntu 16.04 with PHP 7.0, MariaDB 10.0, PostgreSQL 9.5 (PostGIS 2.2) and SQL Server 2017
1094+
- (Docker) Debian 9 with PHP 7.0, MariaDB 10.1, PostgreSQL 9.6 (PostGIS 2.3)
10961095
- (Docker) Ubuntu 18.04 with PHP 7.2, MySQL 5.7, PostgreSQL 10.4 (PostGIS 2.4)
1096+
- (Docker) Debian 10 with PHP 7.3, MariaDB 10.3, PostgreSQL 11.4 (PostGIS 2.5)
1097+
- (Docker) Ubuntu 20.04 with PHP 7.3, MySQL 8.0, PostgreSQL 12 (PostGIS 3)
10971098

10981099
This covers not all environments (yet), so please notify me of failing tests and report your environment.
10991100
I will try to cover most relevant setups in the "docker" folder of the project.

examples/clients/datatables.html

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<html>
2+
<head>
3+
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.20/css/jquery.dataTables.min.css"/>
4+
<script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.js"></script>
5+
<script type="text/javascript" src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js"></script>
6+
<script>
7+
$(document).ready(function() {
8+
$('#example').DataTable( {
9+
ajax: {
10+
url: '/api.php/records/posts?join=categories&join=users',
11+
dataSrc: 'records'
12+
},
13+
columns: [
14+
{ data: "id" },
15+
{ data: "user_id.username" },
16+
{ data: "category_id.name" },
17+
{ data: "content" }
18+
]
19+
});
20+
});
21+
</script>
22+
</head>
23+
<body>
24+
25+
<table id="example" class="display" style="width:100%">
26+
<thead>
27+
<tr>
28+
<th>ID</th>
29+
<th>Username</th>
30+
<th>Category</th>
31+
<th>Content</th>
32+
</tr>
33+
</thead>
34+
<tfoot>
35+
<tr>
36+
<th>ID</th>
37+
<th>Username</th>
38+
<th>Category</th>
39+
<th>Content</th>
40+
</tr>
41+
</tfoot>
42+
</table>
43+
44+
</body>
45+
</html>

0 commit comments

Comments
 (0)