Route Group in Lumen error Call to undefined method LaravelLumenApplication::group()
I have declared a route group in laravel/lumen like so:
$app->group(['middleware' => 'auth'], function () use ($app) {
$app->get('/details', 'UserController@details');
});
all contents of route file web.php are like so:
/*
|--------------------------------------------------------------------------
| 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 = app();
$router->get('/', function () use ($router) {
return $router->app->version();
});
$app->group(['middleware' => 'auth'], function () use ($app) {
$app->get('/details', 'UserController@details');
});
on making a call to http://THE_URL/
I get an error Call to undefined method LaravelLumenApplication::group()
How do I add route group with a middleware ?
php laravel routing lumen lumen-5.2
|
show 3 more comments
I have declared a route group in laravel/lumen like so:
$app->group(['middleware' => 'auth'], function () use ($app) {
$app->get('/details', 'UserController@details');
});
all contents of route file web.php are like so:
/*
|--------------------------------------------------------------------------
| 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 = app();
$router->get('/', function () use ($router) {
return $router->app->version();
});
$app->group(['middleware' => 'auth'], function () use ($app) {
$app->get('/details', 'UserController@details');
});
on making a call to http://THE_URL/
I get an error Call to undefined method LaravelLumenApplication::group()
How do I add route group with a middleware ?
php laravel routing lumen lumen-5.2
Did you check this? lumen.laravel.com/docs/5.2/routing#route-groups although it doesn't seem to be different from what you did.
– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:35
wait! do you have to add those$app = app(); $router->get('/', function () use ($router) { return $router->app->version(); });
?
– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:37
@OmisakinOluwatobi Yes I checked the URL and the part you mentioned in the second comment is the default route defined in lumen also I did add$app = app();
as it was not found
– Shakti Phartiyal
Sep 21 '17 at 17:41
No, I think thats where you have a problem. You don't need to create the$app
variable. Laravel knows how they managed to create that so you can use. At least on my lumen project, this variable is ready for use.
– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:44
1
no post the solution here and mark it as answered
– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:48
|
show 3 more comments
I have declared a route group in laravel/lumen like so:
$app->group(['middleware' => 'auth'], function () use ($app) {
$app->get('/details', 'UserController@details');
});
all contents of route file web.php are like so:
/*
|--------------------------------------------------------------------------
| 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 = app();
$router->get('/', function () use ($router) {
return $router->app->version();
});
$app->group(['middleware' => 'auth'], function () use ($app) {
$app->get('/details', 'UserController@details');
});
on making a call to http://THE_URL/
I get an error Call to undefined method LaravelLumenApplication::group()
How do I add route group with a middleware ?
php laravel routing lumen lumen-5.2
I have declared a route group in laravel/lumen like so:
$app->group(['middleware' => 'auth'], function () use ($app) {
$app->get('/details', 'UserController@details');
});
all contents of route file web.php are like so:
/*
|--------------------------------------------------------------------------
| 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 = app();
$router->get('/', function () use ($router) {
return $router->app->version();
});
$app->group(['middleware' => 'auth'], function () use ($app) {
$app->get('/details', 'UserController@details');
});
on making a call to http://THE_URL/
I get an error Call to undefined method LaravelLumenApplication::group()
How do I add route group with a middleware ?
php laravel routing lumen lumen-5.2
php laravel routing lumen lumen-5.2
asked Sep 21 '17 at 17:27
Shakti Phartiyal
4,18911130
4,18911130
Did you check this? lumen.laravel.com/docs/5.2/routing#route-groups although it doesn't seem to be different from what you did.
– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:35
wait! do you have to add those$app = app(); $router->get('/', function () use ($router) { return $router->app->version(); });
?
– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:37
@OmisakinOluwatobi Yes I checked the URL and the part you mentioned in the second comment is the default route defined in lumen also I did add$app = app();
as it was not found
– Shakti Phartiyal
Sep 21 '17 at 17:41
No, I think thats where you have a problem. You don't need to create the$app
variable. Laravel knows how they managed to create that so you can use. At least on my lumen project, this variable is ready for use.
– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:44
1
no post the solution here and mark it as answered
– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:48
|
show 3 more comments
Did you check this? lumen.laravel.com/docs/5.2/routing#route-groups although it doesn't seem to be different from what you did.
– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:35
wait! do you have to add those$app = app(); $router->get('/', function () use ($router) { return $router->app->version(); });
?
– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:37
@OmisakinOluwatobi Yes I checked the URL and the part you mentioned in the second comment is the default route defined in lumen also I did add$app = app();
as it was not found
– Shakti Phartiyal
Sep 21 '17 at 17:41
No, I think thats where you have a problem. You don't need to create the$app
variable. Laravel knows how they managed to create that so you can use. At least on my lumen project, this variable is ready for use.
– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:44
1
no post the solution here and mark it as answered
– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:48
Did you check this? lumen.laravel.com/docs/5.2/routing#route-groups although it doesn't seem to be different from what you did.
– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:35
Did you check this? lumen.laravel.com/docs/5.2/routing#route-groups although it doesn't seem to be different from what you did.
– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:35
wait! do you have to add those
$app = app(); $router->get('/', function () use ($router) { return $router->app->version(); });
?– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:37
wait! do you have to add those
$app = app(); $router->get('/', function () use ($router) { return $router->app->version(); });
?– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:37
@OmisakinOluwatobi Yes I checked the URL and the part you mentioned in the second comment is the default route defined in lumen also I did add
$app = app();
as it was not found– Shakti Phartiyal
Sep 21 '17 at 17:41
@OmisakinOluwatobi Yes I checked the URL and the part you mentioned in the second comment is the default route defined in lumen also I did add
$app = app();
as it was not found– Shakti Phartiyal
Sep 21 '17 at 17:41
No, I think thats where you have a problem. You don't need to create the
$app
variable. Laravel knows how they managed to create that so you can use. At least on my lumen project, this variable is ready for use.– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:44
No, I think thats where you have a problem. You don't need to create the
$app
variable. Laravel knows how they managed to create that so you can use. At least on my lumen project, this variable is ready for use.– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:44
1
1
no post the solution here and mark it as answered
– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:48
no post the solution here and mark it as answered
– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:48
|
show 3 more comments
3 Answers
3
active
oldest
votes
I just ran into the same problem, with upgrading Lumen from 5.4 to 5.5
In the docs, it states:
Updating The Routes File
After updating your bootstrap/app.php file,
you should update your routes/web.php file to use the $router
variable instead of the $app variable:
$router->get('/hello', function () {
return 'Hello World'; });
For me, this meant lots of updating, where ever $app was used in the routing.
$app->get() => $router->get()
$app->group() => $router->group()
$app->post()/patch()/delete() => $router->post()/patch()/delete()
// Inside functions
$app->group([...], function () use ($app)
=>
$router->group([...], function () use ($router)
// And even in some other files
$app = app();
$app->get();
=>
$app = app();
$router = $app->router;
$router->get();
Hope this helps.
I was actually facing the issue on Lumen and not Laravel.
– Shakti Phartiyal
Aug 2 at 4:06
1
Me too :). I just updated my answer to say Lumen instead of Laravel. Thanks.
– Aine
Aug 4 at 14:02
add a comment |
Found the solution to the problem:
<?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.
|
*/
$router->group(['prefix' => 'api'], function () use ($router) {
$router->get('/', function () use ($router) {
return "API";
});
$router->post('/signin','UserController@signin');
$router->post('/signup','UserController@signup');
$router->group(['middleware' => 'auth'], function () use ($router) {
$router->get('/details', 'UserController@details');
});
});
In order to group routs we have to use:
$router->group(['middleware' => 'auth'], function () use ($router) {
$router->get('/details', 'UserController@details');
});
I dont understand. How to solve this?
– Marcelo Rodovalho
Oct 17 '17 at 21:10
@MarceloRodovalho What problem are you facing ?
– Shakti Phartiyal
Oct 18 '17 at 8:11
add a comment |
Actually as @Aine said in Lumen 5.5+ you should change:
LumenPassport::routes($this->app);
to
LumenPassport::routes($this->app->router);
Application does not have group()
method anymore.
thanks
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46349867%2froute-group-in-lumen-error-call-to-undefined-method-laravel-lumen-applicationg%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
I just ran into the same problem, with upgrading Lumen from 5.4 to 5.5
In the docs, it states:
Updating The Routes File
After updating your bootstrap/app.php file,
you should update your routes/web.php file to use the $router
variable instead of the $app variable:
$router->get('/hello', function () {
return 'Hello World'; });
For me, this meant lots of updating, where ever $app was used in the routing.
$app->get() => $router->get()
$app->group() => $router->group()
$app->post()/patch()/delete() => $router->post()/patch()/delete()
// Inside functions
$app->group([...], function () use ($app)
=>
$router->group([...], function () use ($router)
// And even in some other files
$app = app();
$app->get();
=>
$app = app();
$router = $app->router;
$router->get();
Hope this helps.
I was actually facing the issue on Lumen and not Laravel.
– Shakti Phartiyal
Aug 2 at 4:06
1
Me too :). I just updated my answer to say Lumen instead of Laravel. Thanks.
– Aine
Aug 4 at 14:02
add a comment |
I just ran into the same problem, with upgrading Lumen from 5.4 to 5.5
In the docs, it states:
Updating The Routes File
After updating your bootstrap/app.php file,
you should update your routes/web.php file to use the $router
variable instead of the $app variable:
$router->get('/hello', function () {
return 'Hello World'; });
For me, this meant lots of updating, where ever $app was used in the routing.
$app->get() => $router->get()
$app->group() => $router->group()
$app->post()/patch()/delete() => $router->post()/patch()/delete()
// Inside functions
$app->group([...], function () use ($app)
=>
$router->group([...], function () use ($router)
// And even in some other files
$app = app();
$app->get();
=>
$app = app();
$router = $app->router;
$router->get();
Hope this helps.
I was actually facing the issue on Lumen and not Laravel.
– Shakti Phartiyal
Aug 2 at 4:06
1
Me too :). I just updated my answer to say Lumen instead of Laravel. Thanks.
– Aine
Aug 4 at 14:02
add a comment |
I just ran into the same problem, with upgrading Lumen from 5.4 to 5.5
In the docs, it states:
Updating The Routes File
After updating your bootstrap/app.php file,
you should update your routes/web.php file to use the $router
variable instead of the $app variable:
$router->get('/hello', function () {
return 'Hello World'; });
For me, this meant lots of updating, where ever $app was used in the routing.
$app->get() => $router->get()
$app->group() => $router->group()
$app->post()/patch()/delete() => $router->post()/patch()/delete()
// Inside functions
$app->group([...], function () use ($app)
=>
$router->group([...], function () use ($router)
// And even in some other files
$app = app();
$app->get();
=>
$app = app();
$router = $app->router;
$router->get();
Hope this helps.
I just ran into the same problem, with upgrading Lumen from 5.4 to 5.5
In the docs, it states:
Updating The Routes File
After updating your bootstrap/app.php file,
you should update your routes/web.php file to use the $router
variable instead of the $app variable:
$router->get('/hello', function () {
return 'Hello World'; });
For me, this meant lots of updating, where ever $app was used in the routing.
$app->get() => $router->get()
$app->group() => $router->group()
$app->post()/patch()/delete() => $router->post()/patch()/delete()
// Inside functions
$app->group([...], function () use ($app)
=>
$router->group([...], function () use ($router)
// And even in some other files
$app = app();
$app->get();
=>
$app = app();
$router = $app->router;
$router->get();
Hope this helps.
edited Aug 4 at 14:01
answered Aug 1 at 10:52
Aine
1,41711930
1,41711930
I was actually facing the issue on Lumen and not Laravel.
– Shakti Phartiyal
Aug 2 at 4:06
1
Me too :). I just updated my answer to say Lumen instead of Laravel. Thanks.
– Aine
Aug 4 at 14:02
add a comment |
I was actually facing the issue on Lumen and not Laravel.
– Shakti Phartiyal
Aug 2 at 4:06
1
Me too :). I just updated my answer to say Lumen instead of Laravel. Thanks.
– Aine
Aug 4 at 14:02
I was actually facing the issue on Lumen and not Laravel.
– Shakti Phartiyal
Aug 2 at 4:06
I was actually facing the issue on Lumen and not Laravel.
– Shakti Phartiyal
Aug 2 at 4:06
1
1
Me too :). I just updated my answer to say Lumen instead of Laravel. Thanks.
– Aine
Aug 4 at 14:02
Me too :). I just updated my answer to say Lumen instead of Laravel. Thanks.
– Aine
Aug 4 at 14:02
add a comment |
Found the solution to the problem:
<?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.
|
*/
$router->group(['prefix' => 'api'], function () use ($router) {
$router->get('/', function () use ($router) {
return "API";
});
$router->post('/signin','UserController@signin');
$router->post('/signup','UserController@signup');
$router->group(['middleware' => 'auth'], function () use ($router) {
$router->get('/details', 'UserController@details');
});
});
In order to group routs we have to use:
$router->group(['middleware' => 'auth'], function () use ($router) {
$router->get('/details', 'UserController@details');
});
I dont understand. How to solve this?
– Marcelo Rodovalho
Oct 17 '17 at 21:10
@MarceloRodovalho What problem are you facing ?
– Shakti Phartiyal
Oct 18 '17 at 8:11
add a comment |
Found the solution to the problem:
<?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.
|
*/
$router->group(['prefix' => 'api'], function () use ($router) {
$router->get('/', function () use ($router) {
return "API";
});
$router->post('/signin','UserController@signin');
$router->post('/signup','UserController@signup');
$router->group(['middleware' => 'auth'], function () use ($router) {
$router->get('/details', 'UserController@details');
});
});
In order to group routs we have to use:
$router->group(['middleware' => 'auth'], function () use ($router) {
$router->get('/details', 'UserController@details');
});
I dont understand. How to solve this?
– Marcelo Rodovalho
Oct 17 '17 at 21:10
@MarceloRodovalho What problem are you facing ?
– Shakti Phartiyal
Oct 18 '17 at 8:11
add a comment |
Found the solution to the problem:
<?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.
|
*/
$router->group(['prefix' => 'api'], function () use ($router) {
$router->get('/', function () use ($router) {
return "API";
});
$router->post('/signin','UserController@signin');
$router->post('/signup','UserController@signup');
$router->group(['middleware' => 'auth'], function () use ($router) {
$router->get('/details', 'UserController@details');
});
});
In order to group routs we have to use:
$router->group(['middleware' => 'auth'], function () use ($router) {
$router->get('/details', 'UserController@details');
});
Found the solution to the problem:
<?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.
|
*/
$router->group(['prefix' => 'api'], function () use ($router) {
$router->get('/', function () use ($router) {
return "API";
});
$router->post('/signin','UserController@signin');
$router->post('/signup','UserController@signup');
$router->group(['middleware' => 'auth'], function () use ($router) {
$router->get('/details', 'UserController@details');
});
});
In order to group routs we have to use:
$router->group(['middleware' => 'auth'], function () use ($router) {
$router->get('/details', 'UserController@details');
});
answered Sep 21 '17 at 17:57
Shakti Phartiyal
4,18911130
4,18911130
I dont understand. How to solve this?
– Marcelo Rodovalho
Oct 17 '17 at 21:10
@MarceloRodovalho What problem are you facing ?
– Shakti Phartiyal
Oct 18 '17 at 8:11
add a comment |
I dont understand. How to solve this?
– Marcelo Rodovalho
Oct 17 '17 at 21:10
@MarceloRodovalho What problem are you facing ?
– Shakti Phartiyal
Oct 18 '17 at 8:11
I dont understand. How to solve this?
– Marcelo Rodovalho
Oct 17 '17 at 21:10
I dont understand. How to solve this?
– Marcelo Rodovalho
Oct 17 '17 at 21:10
@MarceloRodovalho What problem are you facing ?
– Shakti Phartiyal
Oct 18 '17 at 8:11
@MarceloRodovalho What problem are you facing ?
– Shakti Phartiyal
Oct 18 '17 at 8:11
add a comment |
Actually as @Aine said in Lumen 5.5+ you should change:
LumenPassport::routes($this->app);
to
LumenPassport::routes($this->app->router);
Application does not have group()
method anymore.
thanks
add a comment |
Actually as @Aine said in Lumen 5.5+ you should change:
LumenPassport::routes($this->app);
to
LumenPassport::routes($this->app->router);
Application does not have group()
method anymore.
thanks
add a comment |
Actually as @Aine said in Lumen 5.5+ you should change:
LumenPassport::routes($this->app);
to
LumenPassport::routes($this->app->router);
Application does not have group()
method anymore.
thanks
Actually as @Aine said in Lumen 5.5+ you should change:
LumenPassport::routes($this->app);
to
LumenPassport::routes($this->app->router);
Application does not have group()
method anymore.
thanks
edited Nov 22 at 22:28
Jan Černý
8121622
8121622
answered Nov 22 at 17:57
zedomel
143
143
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46349867%2froute-group-in-lumen-error-call-to-undefined-method-laravel-lumen-applicationg%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Did you check this? lumen.laravel.com/docs/5.2/routing#route-groups although it doesn't seem to be different from what you did.
– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:35
wait! do you have to add those
$app = app(); $router->get('/', function () use ($router) { return $router->app->version(); });
?– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:37
@OmisakinOluwatobi Yes I checked the URL and the part you mentioned in the second comment is the default route defined in lumen also I did add
$app = app();
as it was not found– Shakti Phartiyal
Sep 21 '17 at 17:41
No, I think thats where you have a problem. You don't need to create the
$app
variable. Laravel knows how they managed to create that so you can use. At least on my lumen project, this variable is ready for use.– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:44
1
no post the solution here and mark it as answered
– Oluwatobi Samuel Omisakin
Sep 21 '17 at 17:48