Most voted "slim" questions
Slim is a micro framework in PHP for the development of simple applications and Apis.
Learn more…76 questions
Sort by count of
-
0
votes1
answer585
viewsSlim framework error: called require.. /Slim/Slim/Slim.php';
Error creating when calling Slim.php function Code: <?php require '../Slim/Slim/Slim.php'; \Slim\Slim::registerAutoloader(); $app = new \Slim\Slim();…
-
0
votes1
answer284
viewsSlim Framework simplexml_load_string parser error
My application sends a string in XML format to the server. $(function() { var xml = "<?xml version='1.0' encoding='UTF-8'?> <note> <to>Tove</to> <from>Jani</from>…
-
0
votes1
answer180
viewsProblem picking up data by ID in the API with Slim
I’m trying to create an API with Slim to power an app, but I came across the following problem: I can get all the data from db, but I can’t get a specific data. At the url: http://localhost/api/…
-
0
votes0
answers41
viewsEncapsulate Restful Web Service Request Replies on the server side
Hello, I developed a Restful Web-Service in PHP using the SLIM framework and an android app to consume its services. It’s working fine, however, the GET request replies, which are returned in JSON…
-
0
votes1
answer39
viewsHow to use Filters in Doctrine?
I have the Entities that I did in Doctrine, and I also have the DAOS, which is where the. I have an API where the user may or may not use Query Parameters as follows:…
-
0
votes1
answer40
viewsWeb service for web/android
I have the following web service $app->get('/alunos', function(){ require_once('db/config.php'); foreach ($db->alunos() ->order("nome") as $row){ $data[]=$row; } echo json_encode($data,…
-
0
votes1
answer112
viewsSiim withJson() has some character limit to convert an array of objects to Json
I have an array of 700 objects that are being loaded correctly by PHP, but at the time of sending the answer to the browser with the return $response->withJson() the following error is shown:…
-
0
votes0
answers42
viewsTesting Magic Methods in PHP UNIT
Hello. I need to test the magic methods in PHP UNIT. I’m using the Slim Framework That it’s them __set() __get() __construct() __invoke() handle()
-
0
votes1
answer32
viewsDecimal type Phinx Slim Framework
How can I create a decimal type in Phinx Migration, see how it is currently: $oss->addColumn('valor','decimal', ['limit' => 10.2]); I’ve tried several ways and I can’t, it always generates…
slimasked 6 years, 3 months ago Renato Souza 321 -
0
votes1
answer109
viewsError passing array as parameter for Eloquent object
I’m having trouble inserting a type 1:N record using Eloquent. When I pass the array with attributes to the object as the documentation guides an error is launched and when I print the error with…
-
0
votes0
answers1832
viewsUpload photo and json in the same request - Postman
I’m having trouble sending in the same request a photo and a json by Postman. I need to send the profile photo of the user and at the same time receive a json with the data from it. //Instância da…
-
0
votes1
answer1760
viewsError "Using $this when not in Object context" in Slim framework
I’m making the following mistake: Fatal error: Using $this when not in Object context in C: Users PC Desktop slim_framework app Controllers Homecontroller.php on line 10 Composer.json { "require": {…
-
0
votes1
answer150
viewsError importing class with use
The structure of my folders and files is like this: What I am trying to do without success, is to use the class Validacao.php in the User.php For that I used the command use Classes\Validacao;…
-
0
votes1
answer93
viewsAuthentication external websites
I am using JWT to authenticate access. When I try a GET request from outside my system, it displays this message: snippet of the code where I make the request (js): [...] var cep =…
-
0
votes1
answer78
viewsView data is disappearing at a certain time
Here’s the thing, from what I understand the whole project follows the MVC Standard. I just have a big problem. A view of requests there is a refresh 30 seconds simple, looking for new orders. So…
-
0
votes0
answers35
viewsPHP Slim cannot bind
I made a function to insert in a list of a JSON, only when it goes to prepare the PDO, replace the values happens an error, I do not see where I am missing. public function newDeviceList(){ global…
-
0
votes0
answers66
viewsDoubts about the $_GET variable
I have this research form And I’m getting her fee for the $_GET on this route $app->get("/search", function() { $page = (isset($_GET['page'])) ? (int)$_GET['page'] : 1; $pagination =…
-
0
votes3
answers574
viewsSLIM FRAMEWORK - 404 PAGE NOT FOUND
Hello, good morning. I am trying to make a route using SLIM and I can normally access via URL and internally(via menu) the pages with SLIM configured, but when I login to the site, it does not send…
-
0
votes2
answers87
viewsHosting and favicon error 404
I have an API developed with Slim 3. The API worked perfectly, testing with Postman or by browser, everything worked perfectly. I had to change the hosting. So I went up the API to new host and…
-
0
votes1
answer89
viewsRequest $request, Response $Response in an abstract controller class SLIM FRAMEWORK PHP
Good afternoon to you all. I’m studying Slim Framework 3.12 for PHP, and I’m building my controllers to be called on the routes. I have a class abstract called Controller.php that I use to…
-
0
votes1
answer24
viewsSlimframeworrk only accesses by duplicating bars in the URL
I am using Slimframework and I have the following code: <?php use Psr\Http\Message\ServerRequestInterface as Request; use Psr\Http\Message\ResponseInterface as Response; use…
-
0
votes1
answer38
viewsHow to use PDO in slimfamework 4?
Could someone tell me how I instate PDO in a file in the slim framework using the app->get? I did in the configuration in the file Settings and dependencies but I do not know how to call the…
-
0
votes1
answer65
viewsSlim - Trying to get Property 'password' of non-object in
Good night. I’m doing a job for college that involves logging in.. I’m using the post to pull the requisitions and is giving me the following error: <br /> <b>Notice</b>: Trying to…
-
0
votes0
answers16
viewsThe slim route is not catching the callable
He takes the methods and Patterns, but it looks like he’s ingorando the callable. $group->group('/figure', function (\Slim\Routing\RouteCollectorProxy $group) { $group->map(['GET'],…
-
-1
votes2
answers585
viewsSaving in the database
I need to save a form in the bank, with several fields input. Someone has an example of how to pass the fields. I am using the framework Angularjs (If I need to turn them into one array or use json…
-
-2
votes1
answer20
viewsPDO returns only one rewrite
Hello. My algorithm is only returning a record from the database. I have reviewed the code several times, but I cannot understand the reason. I’m using the Slim Framework. Follows the code: index…