I'm just trying to understand how to use the question mark with a URL like :
http://localhost/AllOfCats/index.php?m=something
The way I was trying :
$app->get('/', function() use ($app) {
$req = $app->request(); $m= $req->get('m');
echo "GET route : $m"; });
But sadly it didn't work. Do you have any idea why?
Thank you very much.
I set up the application and tested it and it works okay. Make sure that you have your app set up in your application correctly. Your app should look something like this. Make sure you didn't miss boiler plate code for setting up slim and running the application.
<?php
require 'vendor/autoload.php';
$app = new \Slim\Slim();
$app->get('/', function() use ($app) {
$req = $app->request(); $m= $req->get('m');
echo "GET route : $m"; });
$app->run();