Level 1
the mod_rewrite in apache it was turn off
LoadModule rewrite_module modules/mod_rewrite.so
After composer installation , i have tried first app.
I have a local host configuration
c:\wamp\www\vhost\rest-mnm.localhost
Define myhost rest-mnm
Define hostextension localhost
<VirtualHost *:80>
ServerAdmin ${myhost}@${hostextension}
ServerName ${myhost}.${hostextension}
ServerAlias www.${myhost}.${hostextension}
# DocumentRoot C:\wamp\www\lumen\${myhost}
DocumentRoot C:\wamp\www\lumen\${myhost}\public
DirectoryIndex index.php index.html index.htm
<Directory />
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
# Ricordarsi di creare la directory
ErrorLog C:\wamp\logs\${myhost}.${hostextension}.error.log
CustomLog C:\wamp\logs\${myhost}.${hostextension}.access.log combined
work fine and i see in http://rest-mmn.localhost this info
Lumen (5.2.6) (Laravel Components 5.2.*)
now i will create a new route, i go into app/http/routes.php and i add
$app->get('/',
function () use ($app)
{
return $app->version();
});
//from doc!
$app->get("/users/{id}",function ($id) {
return 'User '.$id;
});
i tryto use http://rest-mnm.localhost/users/1234 and i have always
Not Found
The requested URL /users/1234 was not found on this server.
Apache/2.4.9 (Win32) PHP/5.5.12 Server at rest-mnm.localhost Port 80
the index.php (with all attempts)
$app = require __DIR__.'/../bootstrap/app.php';
//$app->run(); //not work
$app->run($app['request']); //not work
the mod_rewrite in apache it was turn off
LoadModule rewrite_module modules/mod_rewrite.so
Please or to participate in this conversation.