Questions tagged [slim-3]

Slim 3 is the successor to Slim 2, a micro framework for PHP.

Resources

Related tags


For the Ruby template engine use instead.

421 questions
0
votes
3 answers

How to pass POST value to Slimframe work page in php

I need to pass HTML form fields using POST method to Slim framework in php. please help.
Raja
  • 25
  • 6
0
votes
0 answers

Redirect URL from root to Public folder

I have a SLIM project I have set up for a RESTful webs service. My project structure is as below: -MyProject -app -logs -public -index.php -.htaccess -vendor -composer.json -composer.lock So right now to access my routes…
bos570
  • 1,505
  • 2
  • 23
  • 45
0
votes
1 answer

Retrieving IP address in SlimFramework 3 with rka-ip-address-middleware

Background I am creating a REST API to work with my mobile app. It is important that I keep a record of any request made to the server by IP address for legality purposes. I understand people can spoof the IP if they want, but that is not a…
wuno
  • 9,547
  • 19
  • 96
  • 180
0
votes
2 answers

convert array to json parse-sdk-php (Parse Server)

how to convert array results from ParseQuery() as JSON because the results always return as Array. In addition, am using Slim3 framework for routing. $query = new ParseQuery("Friends"); $results = $query->find(); I searched a lot but without…
WonderX
  • 95
  • 9
0
votes
1 answer

PHP Slim 3 Framework - where can I put my controller file?

I registering a controller with the container, but it seems not working because it doesn't match to the correct location. \slim\src\routes.php get('/dd',…
kkasp
  • 113
  • 1
  • 9
0
votes
1 answer

Mocking environment with Slim3 for CLI

I am trying to mock an environment to enable slim3 cli interface. #!/usr/bin/env php
James Kipling
  • 121
  • 10
0
votes
0 answers

Fatal error: Class 'Slim\app' not found in locally it works but Error on Hosting

I tried to upload it on hosting, but I get message Fatal Error, I tried locally just fine it works, is there any setup?
0
votes
1 answer

Using json's value as slim's error code

Right now I have this: $error = new Error($id, $from, $to); return $response ->withStatus(422) ->withHeader('Content-Type', 'text/html') ->write($error->error()); The Error class returns…
Newwt
  • 491
  • 1
  • 5
  • 22
0
votes
1 answer

Accessing Online Slim API from iphone & IOS application

I have simple API developed in Slim, which is stored in Online Server. It works fine when I check it from browser, but when I retrieve it from Iphone app, it show me the following error: PeopleAlsoAsk[12607:2219389] Error…
Skylink
  • 83
  • 1
  • 9
0
votes
1 answer

Implementing Slim framework to API

I've been trying for quite a while, and I don't quite understand how and why everything works with slim. Without Slim everything works fine and I kinda know how everything works (this is a small project I'm doing to learn ajax, object-oriented php…
Newwt
  • 491
  • 1
  • 5
  • 22
0
votes
1 answer

Slim3 error. Can't find class

I'm trying to make my slim3 application work on my VPS, but so far, I've had no luck. It works 100% on my windows machine, but when I move it to my Ubuntu 16.04 VPS, it is not working. I get this message "Message: Class 'app\views\auth\Auth' not…
0
votes
1 answer

php mail() not sent with slim 3 getParams() data

I am doing a mail sent function from a contact form inside a Slim 3 project. I get the name, email and message field data from $request->getParams() and then place it to an $email_message to send the information directly to my email. And the email…
Anh K
  • 96
  • 5
0
votes
1 answer

Slim 3 Framework Rest Nested Routes

Is there a way to do this: 1. $app->get('/phonenumbers', \PhonenumbersController::class . ':index'); 2. $app->get('/users/1/phonenumbers', \PhonenumbersController::class . ':index'); Would like the second route to resolve…
Tali Luvhengo
  • 349
  • 1
  • 15
0
votes
1 answer

How to get pdf created with PHP WkHtmlToPdf to download with slim 3 without encoding breaking

I am creating a pdf from html using php wkhtmltopdf If I save the file directly to my server, the pdf works $pdf->saveAs('/path/to/mypdf.pdf'); If I convert it to a string first and then save it to file with php the pdf file still works. $content…
Finglish
  • 9,692
  • 14
  • 70
  • 114
0
votes
1 answer

How to escape subfolder in slim3 framework being routed by slim3

I have a project built with slim 3 and is working as expected (http://localhost/slimapp/). Now what I want to do is in one of the subfolder run an Angular2 application. But as I try to access the subfolder (http://localhost/slimapp/angularapp/) via…