Bonjour j'ai installé lumen, et je n'arrive à obtenir une route, voici mon test:

lorsque je lance l'url :
j'ai bien un affiche de la version:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 
Lumen (5.4.6) (Laravel Components 5.4.*)
voici la page appelle (public/index.php)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
<?php
 
/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| First we need to get an application instance. This creates an instance
| of the application / container and bootstraps the application so it
| is ready to receive HTTP / Console requests from the environment.
|
*/
 
$app = require __DIR__.'/../bootstrap/app.php';
 
/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/
//$app->routes::get('/menuCours', 'MenuCours@Index');
 
$app->run();
dans le dossier route il y a un fichier route/web.php
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 
<?php
 
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/
 
$app->get('/', function () use ($app) {
 
    return $app->version();
 
 
});
c'est lui qui donne la version de lumen,

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
 
$app->get('/', function () use ($app) {
 
    return $app->version();
 
 
});
maintenant j'ai ajouté une nouvelle route:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 
$app->get('/menuCours', 'MenuCours@Index');
si j'appelle l'url "/public/menuCours" j'ai "no found", même chose avec la route "/menuCours".

Comment je dois précéder pour obtenir cette route ? j'aimerais faire une requête ajax depuis une machine client qui appelle directement l'url menuCours ?

merci de vos réponses.