Questions tagged as 'slim'

2
answers

What would be the route model for an API Rest in more complex operations?

I researched a little about the REST API model, but among many questions I had, I had one that is essentially important. The staff always gave examples of model routes similar to this: https://api.dominio.com.br/account[/{id}] GET -> ob...
asked by 03.09.2017 / 02:16
1
answer

Routes of the Slim PHP Framework

Hello everyone, I'm having trouble using the Slim framework ... when I try to access via get the root "/" I get it normal, but when I try to access other methods like "/ hello" it simply n goes from the error "Not Found The requested URL / sli...
asked by 30.01.2015 / 03:26
1
answer

What is the best method to do login authentication in android and webservice php RESTFul?

I'm building an application that needs login, I've already created the webservice in php using Slim. I'm currently using a POST, passing a json with email and password to the webservice to return the corresponding user's json, but I believe t...
asked by 06.09.2015 / 19:12
3
answers

Send parameters via GET

I am making a request as follows. http://localhost/sistema-agenda-server/tarefas/listAll?id=1 I asked to see the response in the generated sql and got the following answer: SELECT * FROM tarefas WHERE idu_tar=:id : id was not changed to...
asked by 05.11.2015 / 01:05
1
answer

Render view through the controller using Slim Framework 3

I'm trying to find a way to render the view using a controller in slim framework but for some reason I'm getting the error: Message: Using $this when not in object context The function is a public function and is inside a class norma...
asked by 24.12.2016 / 21:20
2
answers

Routing with slim does not work

I'm trying to use Slim FrameWork by following documentation for the same, I configured mod_rewrite and installed mcryp; If I call http://localhost/slim/books I have: Not Found If I call http://localhost/frame/index.php?books...
asked by 23.07.2014 / 04:11
1
answer

Display Datetime Content Using Doctrine

In a WebService project using SlimFramework, I decided to add Doctrine to do the queries in the DB. I resolved to follow DOCTRINE's guidance for working with Datetime and Time Zones on this site Doctrine Documentation When trying to recover...
asked by 21.09.2016 / 02:16
1
answer

Site AngularJS accessing API, authentication question

I have an API written in PHP + Slim, which is being used by an administrative panel, and authentication is via token, which is returned when the panel user logs in. However, I'm doing a site with Angular and would like to reuse the API, but I...
asked by 09.03.2016 / 21:29
1
answer

Slim error BadRouteException

Checking the logs on the server found the following error: Slim Application Error: Type: FastRoute\BadRouteException Message: Static route "/client/schedules" is shadowed by previously defined variable route "/client/([^/]+)" for method "GET"...
asked by 22.08.2017 / 10:41
1
answer

POST - Slim PHP

I'm a beginner in webservices and I'm studying on top of Slim (PHP) but I'm having a little problem saving something in the database. My job to try to save a new category to the bank is as follows: function addCategoria(){ global $app;...
asked by 01.10.2015 / 17:08