Sebelumnya kita sudah mebuat API
Tutorial Membuat RESTful API dengan Slim Framework [bagian 1]
TUTORIAL MEMBUAT RESTFUL API DENGAN SLIM FRAMEWORK [BAGIAN 2]
TUTORIAL MEMBUAT RESTFUL API DENGAN SLIM FRAMEWORK [BAGIAN 3]
TUTORIAL MEMBUAT RESTFUL API DENGAN SLIM FRAMEWORK [BAGIAN 4]
TUTORIAL MEMBUAT RESTFUL API DENGAN SLIM FRAMEWORK [BAGIAN 5]
TUTORIAL MEMBUAT RESTFUL API DENGAN SLIM FRAMEWORK [BAGIAN 6]
dari latihan diatas kita sudah menghasilkan API
localhost/apicatatan/index.php/listcatatan
method : GET
localhost/apicatatan/index.php/logcatatan
Method : GET
localhost/apicatatan/index.php/addcatatan
Method : POST
localhost/apicatatan/index.php/editcatatan
Method : POST
localhost/apicatatan/index.php/deletecatatan
Method : POST
localhost/apicatatan/index.php/restorecatatan
Method : POST
bagaimana cara menghilangkan index.php
buatlah file : .htaccess pada folder apicatatan
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^ index.php [QSA,L]
Sehingga API nya menjadi
localhost/apicatatan/listcatatan localhost/apicatatan/logcatatan localhost/apicatatan/addcatatan localhost/apicatatan/editcatatan/id localhost/apicatatan/deletecatatan/id localhost/apicatatan/restorecatatan/id
atau kamu bisa menggunakan yang sudah online
https://flutter.id/api/catatan/listcatatan https://flutter.id/api/catatan/logcatatan https://flutter.id/api/catatan/addcatatan https://flutter.id/api/catatan/editcatatan/id https://flutter.id/api/catatan/deletecatatan/id https://flutter.id/api/catatan/restorecatatan/id
Semoga Bermanfaat