A
A
Andrew2020-07-06 17:10:54
SQL
Andrew, 2020-07-06 17:10:54

SQL queries in slim framework?

I don’t think much in php, there was a need to make a small socially useful site, I wrote everything in one file, a site of 5 pages with a database, everything works fine.
I needed to write another similar site (with the idea that it would have an API), I decided to take some simple framework, I chose slim v4, I decided to transfer an existing site to it for experiments, I found an article on Habré, I did everything according to it, though I had to exclude middleware, something did not take off, I thought that it was not needed. Templates made, everything works fine, without a database. In the v3 documentation I found "Using Eloquent with Slim", something similar to requests, but I look at this guide like a ram into the abyss.
The question is, I can’t understand where (in what place) I need to connect PDO, and where and how to call it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question