Laravel php artisan produces error
I have integrated and working in a Laravel 5.4 project. I was actually configure this correctly and php artisan
command was working perfectly before.But in between the development time(I have implemented the schedule task using laravel and not sure after that issue appear) it produces m error on php artisan commands. Can anybody help me on this.
The following is the error log for the command for any artisan command
PHP Fatal error: Uncaught
SymfonyComponentDebugExceptionFatalThrowableError: Type error:
Argument 2 passed to IlluminateRoutingUrlGenerator::__construct()
must be an instance of IlluminateHttpRequest, null given, called in
/var/www/html/project/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php
on line 60 in
/var/www/html/project/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:103
Stack trace:
#0 /var/www/html/projrct/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php(60):
IlluminateRoutingUrlGenerator->__construct(Object(IlluminateRoutingRouteCollection),
NULL)
#1 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Container/Container.php(290):
IlluminateRoutingRoutingServiceProvider->IlluminateRouting{closure}(Object(IlluminateFoundationApplication))
#2 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Container/Container.php(746):
IlluminateContainerContainer->IlluminateContainer{closur in
/var/www/html/project/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php
on line 103
laravel laravel-5 artisan
add a comment |
I have integrated and working in a Laravel 5.4 project. I was actually configure this correctly and php artisan
command was working perfectly before.But in between the development time(I have implemented the schedule task using laravel and not sure after that issue appear) it produces m error on php artisan commands. Can anybody help me on this.
The following is the error log for the command for any artisan command
PHP Fatal error: Uncaught
SymfonyComponentDebugExceptionFatalThrowableError: Type error:
Argument 2 passed to IlluminateRoutingUrlGenerator::__construct()
must be an instance of IlluminateHttpRequest, null given, called in
/var/www/html/project/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php
on line 60 in
/var/www/html/project/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:103
Stack trace:
#0 /var/www/html/projrct/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php(60):
IlluminateRoutingUrlGenerator->__construct(Object(IlluminateRoutingRouteCollection),
NULL)
#1 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Container/Container.php(290):
IlluminateRoutingRoutingServiceProvider->IlluminateRouting{closure}(Object(IlluminateFoundationApplication))
#2 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Container/Container.php(746):
IlluminateContainerContainer->IlluminateContainer{closur in
/var/www/html/project/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php
on line 103
laravel laravel-5 artisan
Please do not include screenshots of your error messages! Copy and paste them into your question with proper formatting.
– milo526
Jul 17 '17 at 20:15
@milo526 thanks for quick reply and i have done the changes.
– anoop
Jul 17 '17 at 20:24
i its not an artisan error, i think you have error syntax somewhere in you routes or controllers files
– omadonex
Jul 17 '17 at 22:11
1
Whether you created any CommandController(Used for schedule task) file for schedule task?
– Mohammad Alfaz
Jul 18 '17 at 4:07
@Mohammad Alfaz Yes i am. I have created a scheduled task and created command class under app/Console/Commands/Sample.php
– anoop
Jul 18 '17 at 11:52
add a comment |
I have integrated and working in a Laravel 5.4 project. I was actually configure this correctly and php artisan
command was working perfectly before.But in between the development time(I have implemented the schedule task using laravel and not sure after that issue appear) it produces m error on php artisan commands. Can anybody help me on this.
The following is the error log for the command for any artisan command
PHP Fatal error: Uncaught
SymfonyComponentDebugExceptionFatalThrowableError: Type error:
Argument 2 passed to IlluminateRoutingUrlGenerator::__construct()
must be an instance of IlluminateHttpRequest, null given, called in
/var/www/html/project/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php
on line 60 in
/var/www/html/project/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:103
Stack trace:
#0 /var/www/html/projrct/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php(60):
IlluminateRoutingUrlGenerator->__construct(Object(IlluminateRoutingRouteCollection),
NULL)
#1 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Container/Container.php(290):
IlluminateRoutingRoutingServiceProvider->IlluminateRouting{closure}(Object(IlluminateFoundationApplication))
#2 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Container/Container.php(746):
IlluminateContainerContainer->IlluminateContainer{closur in
/var/www/html/project/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php
on line 103
laravel laravel-5 artisan
I have integrated and working in a Laravel 5.4 project. I was actually configure this correctly and php artisan
command was working perfectly before.But in between the development time(I have implemented the schedule task using laravel and not sure after that issue appear) it produces m error on php artisan commands. Can anybody help me on this.
The following is the error log for the command for any artisan command
PHP Fatal error: Uncaught
SymfonyComponentDebugExceptionFatalThrowableError: Type error:
Argument 2 passed to IlluminateRoutingUrlGenerator::__construct()
must be an instance of IlluminateHttpRequest, null given, called in
/var/www/html/project/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php
on line 60 in
/var/www/html/project/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:103
Stack trace:
#0 /var/www/html/projrct/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php(60):
IlluminateRoutingUrlGenerator->__construct(Object(IlluminateRoutingRouteCollection),
NULL)
#1 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Container/Container.php(290):
IlluminateRoutingRoutingServiceProvider->IlluminateRouting{closure}(Object(IlluminateFoundationApplication))
#2 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Container/Container.php(746):
IlluminateContainerContainer->IlluminateContainer{closur in
/var/www/html/project/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php
on line 103
laravel laravel-5 artisan
laravel laravel-5 artisan
edited Jul 17 '17 at 20:23
anoop
asked Jul 17 '17 at 19:55
anoopanoop
49641337
49641337
Please do not include screenshots of your error messages! Copy and paste them into your question with proper formatting.
– milo526
Jul 17 '17 at 20:15
@milo526 thanks for quick reply and i have done the changes.
– anoop
Jul 17 '17 at 20:24
i its not an artisan error, i think you have error syntax somewhere in you routes or controllers files
– omadonex
Jul 17 '17 at 22:11
1
Whether you created any CommandController(Used for schedule task) file for schedule task?
– Mohammad Alfaz
Jul 18 '17 at 4:07
@Mohammad Alfaz Yes i am. I have created a scheduled task and created command class under app/Console/Commands/Sample.php
– anoop
Jul 18 '17 at 11:52
add a comment |
Please do not include screenshots of your error messages! Copy and paste them into your question with proper formatting.
– milo526
Jul 17 '17 at 20:15
@milo526 thanks for quick reply and i have done the changes.
– anoop
Jul 17 '17 at 20:24
i its not an artisan error, i think you have error syntax somewhere in you routes or controllers files
– omadonex
Jul 17 '17 at 22:11
1
Whether you created any CommandController(Used for schedule task) file for schedule task?
– Mohammad Alfaz
Jul 18 '17 at 4:07
@Mohammad Alfaz Yes i am. I have created a scheduled task and created command class under app/Console/Commands/Sample.php
– anoop
Jul 18 '17 at 11:52
Please do not include screenshots of your error messages! Copy and paste them into your question with proper formatting.
– milo526
Jul 17 '17 at 20:15
Please do not include screenshots of your error messages! Copy and paste them into your question with proper formatting.
– milo526
Jul 17 '17 at 20:15
@milo526 thanks for quick reply and i have done the changes.
– anoop
Jul 17 '17 at 20:24
@milo526 thanks for quick reply and i have done the changes.
– anoop
Jul 17 '17 at 20:24
i its not an artisan error, i think you have error syntax somewhere in you routes or controllers files
– omadonex
Jul 17 '17 at 22:11
i its not an artisan error, i think you have error syntax somewhere in you routes or controllers files
– omadonex
Jul 17 '17 at 22:11
1
1
Whether you created any CommandController(Used for schedule task) file for schedule task?
– Mohammad Alfaz
Jul 18 '17 at 4:07
Whether you created any CommandController(Used for schedule task) file for schedule task?
– Mohammad Alfaz
Jul 18 '17 at 4:07
@Mohammad Alfaz Yes i am. I have created a scheduled task and created command class under app/Console/Commands/Sample.php
– anoop
Jul 18 '17 at 11:52
@Mohammad Alfaz Yes i am. I have created a scheduled task and created command class under app/Console/Commands/Sample.php
– anoop
Jul 18 '17 at 11:52
add a comment |
4 Answers
4
active
oldest
votes
I my case url() helper function in my filesystem.php is causing the issue. I removed it and every thing works fine.
add a comment |
Please make sure that you are not using any url() or asset() or other helpers functions inside your configuration files
Yes exactly that was the reason i found it and forgot to update here. Anyways thank you for your response.
– anoop
Aug 24 '17 at 7:15
add a comment |
I figured out the problem, when you are running any artisan command you should avoid using helper
functions in any of your config
files. Just comment those and try to run artisan command after running that uncomment your config
files.
//in config/'any_file.php'
return [
'name' => 'Larvel',
'url' => url('/')
];
//just change and uncomment url() helper
return [
'name' => 'Larvel',
//'url' => url('/')
];
add a comment |
On My custom config
file I used url()
. That was causing this issue. When I commented out the url()
line, everything worked fine.
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%2f45152585%2flaravel-php-artisan-produces-error%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
I my case url() helper function in my filesystem.php is causing the issue. I removed it and every thing works fine.
add a comment |
I my case url() helper function in my filesystem.php is causing the issue. I removed it and every thing works fine.
add a comment |
I my case url() helper function in my filesystem.php is causing the issue. I removed it and every thing works fine.
I my case url() helper function in my filesystem.php is causing the issue. I removed it and every thing works fine.
answered Sep 18 '17 at 6:34
Awais JameelAwais Jameel
17714
17714
add a comment |
add a comment |
Please make sure that you are not using any url() or asset() or other helpers functions inside your configuration files
Yes exactly that was the reason i found it and forgot to update here. Anyways thank you for your response.
– anoop
Aug 24 '17 at 7:15
add a comment |
Please make sure that you are not using any url() or asset() or other helpers functions inside your configuration files
Yes exactly that was the reason i found it and forgot to update here. Anyways thank you for your response.
– anoop
Aug 24 '17 at 7:15
add a comment |
Please make sure that you are not using any url() or asset() or other helpers functions inside your configuration files
Please make sure that you are not using any url() or asset() or other helpers functions inside your configuration files
answered Aug 19 '17 at 9:28
Ahmed Abu EldahabAhmed Abu Eldahab
9841712
9841712
Yes exactly that was the reason i found it and forgot to update here. Anyways thank you for your response.
– anoop
Aug 24 '17 at 7:15
add a comment |
Yes exactly that was the reason i found it and forgot to update here. Anyways thank you for your response.
– anoop
Aug 24 '17 at 7:15
Yes exactly that was the reason i found it and forgot to update here. Anyways thank you for your response.
– anoop
Aug 24 '17 at 7:15
Yes exactly that was the reason i found it and forgot to update here. Anyways thank you for your response.
– anoop
Aug 24 '17 at 7:15
add a comment |
I figured out the problem, when you are running any artisan command you should avoid using helper
functions in any of your config
files. Just comment those and try to run artisan command after running that uncomment your config
files.
//in config/'any_file.php'
return [
'name' => 'Larvel',
'url' => url('/')
];
//just change and uncomment url() helper
return [
'name' => 'Larvel',
//'url' => url('/')
];
add a comment |
I figured out the problem, when you are running any artisan command you should avoid using helper
functions in any of your config
files. Just comment those and try to run artisan command after running that uncomment your config
files.
//in config/'any_file.php'
return [
'name' => 'Larvel',
'url' => url('/')
];
//just change and uncomment url() helper
return [
'name' => 'Larvel',
//'url' => url('/')
];
add a comment |
I figured out the problem, when you are running any artisan command you should avoid using helper
functions in any of your config
files. Just comment those and try to run artisan command after running that uncomment your config
files.
//in config/'any_file.php'
return [
'name' => 'Larvel',
'url' => url('/')
];
//just change and uncomment url() helper
return [
'name' => 'Larvel',
//'url' => url('/')
];
I figured out the problem, when you are running any artisan command you should avoid using helper
functions in any of your config
files. Just comment those and try to run artisan command after running that uncomment your config
files.
//in config/'any_file.php'
return [
'name' => 'Larvel',
'url' => url('/')
];
//just change and uncomment url() helper
return [
'name' => 'Larvel',
//'url' => url('/')
];
answered Oct 24 '18 at 7:25
Shahrukh AnwarShahrukh Anwar
947811
947811
add a comment |
add a comment |
On My custom config
file I used url()
. That was causing this issue. When I commented out the url()
line, everything worked fine.
add a comment |
On My custom config
file I used url()
. That was causing this issue. When I commented out the url()
line, everything worked fine.
add a comment |
On My custom config
file I used url()
. That was causing this issue. When I commented out the url()
line, everything worked fine.
On My custom config
file I used url()
. That was causing this issue. When I commented out the url()
line, everything worked fine.
answered Jan 1 at 10:33
Ariful HaqueAriful Haque
1,89232137
1,89232137
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.
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%2f45152585%2flaravel-php-artisan-produces-error%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
Please do not include screenshots of your error messages! Copy and paste them into your question with proper formatting.
– milo526
Jul 17 '17 at 20:15
@milo526 thanks for quick reply and i have done the changes.
– anoop
Jul 17 '17 at 20:24
i its not an artisan error, i think you have error syntax somewhere in you routes or controllers files
– omadonex
Jul 17 '17 at 22:11
1
Whether you created any CommandController(Used for schedule task) file for schedule task?
– Mohammad Alfaz
Jul 18 '17 at 4:07
@Mohammad Alfaz Yes i am. I have created a scheduled task and created command class under app/Console/Commands/Sample.php
– anoop
Jul 18 '17 at 11:52