laravel making its own route to blade fileLaravel routing returns error: “Class LoginController does not exist”Laravel 5 new routes don't workWhere do I change the routing for the login page in Laravel 5.3?Laravel 5.6 Error NotFoundHttpException in RouteCollection.php (line 179)Laravel 5.6 Routing doesn't workLaravel new project routing not working?Laravel blade with Vue component not show dataNew Laravel Routes not workingLaravel - Basic route 404Laravel 5.7 Login Form Route
If a person had control of every single cell of their body, would they be able to transform into another creature?
Image processing: Removal of two spots in fundus images
How do I know what is the origin IP if I ping from a router to a host of an external network in packet tracer?
Does the unit of measure matter when you are solving for the diameter of a circumference?
How to know if a folder is a symbolic link?
Is it possible to play as a necromancer skeleton?
Computing the matrix powers of a non-diagonalizable matrix
Have 1.5% of all nuclear reactors ever built melted down?
Flying domestically in the US, is my State Issued ID all I need to get past security?
Why do Ryanair allow me to book connecting itineraries through a third party, but not through their own website?
In general, would I need to season a meat when making a sauce?
How strong are Wi-Fi signals?
Is there an efficient way to replace text matching the entire content of one file with the entire content of another file?
Why were helmets and other body armour not commonplace in the 1800s?
What is the object moving across the ceiling in this stock footage?
Why doesn't the Earth accelerate towards the Moon?
Why did David Cameron offer a referendum on the European Union?
Why aren't space telescopes put in GEO?
Should breaking down something like a door be adjudicated as an attempt to beat its AC and HP, or as an ability check against a set DC?
Why do Windows registry hives appear empty?
How should I introduce map drawing to my players?
align* environment issues
Count rotary dial pulses in a phone number (including letters)
How to make a villain fall in love?
laravel making its own route to blade file
Laravel routing returns error: “Class LoginController does not exist”Laravel 5 new routes don't workWhere do I change the routing for the login page in Laravel 5.3?Laravel 5.6 Error NotFoundHttpException in RouteCollection.php (line 179)Laravel 5.6 Routing doesn't workLaravel new project routing not working?Laravel blade with Vue component not show dataNew Laravel Routes not workingLaravel - Basic route 404Laravel 5.7 Login Form Route
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
working a project with Laravel 5.6.
the problem is, when im going to an url like:
/login
or any other route and specify where it should go, it making its own route and going to another place. no metter if i even clear the code of that blade file.
i have not several routes or blade file that are the same. i have cleared my browser cache, laravel cach, config cache, and the command:
php artisan route:cache
did not worked to clear route cache.
my code example: web.php code
Route::get("/login", "LoginController@login");
Example: LoginController.php code
public function login()
return view('/login'); // not going to this path
to conclude, it does not read my code :(
need your ideas!
php laravel
|
show 3 more comments
working a project with Laravel 5.6.
the problem is, when im going to an url like:
/login
or any other route and specify where it should go, it making its own route and going to another place. no metter if i even clear the code of that blade file.
i have not several routes or blade file that are the same. i have cleared my browser cache, laravel cach, config cache, and the command:
php artisan route:cache
did not worked to clear route cache.
my code example: web.php code
Route::get("/login", "LoginController@login");
Example: LoginController.php code
public function login()
return view('/login'); // not going to this path
to conclude, it does not read my code :(
need your ideas!
php laravel
Can you update your web.php code here ?
– Md.Sukel Ali
Mar 24 at 6:02
Route::get('/login', 'controller@login'); the web.php code looks like this
– hekmat
Mar 24 at 6:05
Update your question with web.php and controller login method code
– keizah
Mar 24 at 6:08
Yes, thats wrong .. you should change the name of the controller "controller" to a specific name like: "ArticleController"
– rook99
Mar 24 at 6:09
@keizah updated, i dont think that would be the problem.
– hekmat
Mar 24 at 6:16
|
show 3 more comments
working a project with Laravel 5.6.
the problem is, when im going to an url like:
/login
or any other route and specify where it should go, it making its own route and going to another place. no metter if i even clear the code of that blade file.
i have not several routes or blade file that are the same. i have cleared my browser cache, laravel cach, config cache, and the command:
php artisan route:cache
did not worked to clear route cache.
my code example: web.php code
Route::get("/login", "LoginController@login");
Example: LoginController.php code
public function login()
return view('/login'); // not going to this path
to conclude, it does not read my code :(
need your ideas!
php laravel
working a project with Laravel 5.6.
the problem is, when im going to an url like:
/login
or any other route and specify where it should go, it making its own route and going to another place. no metter if i even clear the code of that blade file.
i have not several routes or blade file that are the same. i have cleared my browser cache, laravel cach, config cache, and the command:
php artisan route:cache
did not worked to clear route cache.
my code example: web.php code
Route::get("/login", "LoginController@login");
Example: LoginController.php code
public function login()
return view('/login'); // not going to this path
to conclude, it does not read my code :(
need your ideas!
php laravel
php laravel
edited Mar 24 at 6:17
hekmat
asked Mar 24 at 6:01
hekmathekmat
245
245
Can you update your web.php code here ?
– Md.Sukel Ali
Mar 24 at 6:02
Route::get('/login', 'controller@login'); the web.php code looks like this
– hekmat
Mar 24 at 6:05
Update your question with web.php and controller login method code
– keizah
Mar 24 at 6:08
Yes, thats wrong .. you should change the name of the controller "controller" to a specific name like: "ArticleController"
– rook99
Mar 24 at 6:09
@keizah updated, i dont think that would be the problem.
– hekmat
Mar 24 at 6:16
|
show 3 more comments
Can you update your web.php code here ?
– Md.Sukel Ali
Mar 24 at 6:02
Route::get('/login', 'controller@login'); the web.php code looks like this
– hekmat
Mar 24 at 6:05
Update your question with web.php and controller login method code
– keizah
Mar 24 at 6:08
Yes, thats wrong .. you should change the name of the controller "controller" to a specific name like: "ArticleController"
– rook99
Mar 24 at 6:09
@keizah updated, i dont think that would be the problem.
– hekmat
Mar 24 at 6:16
Can you update your web.php code here ?
– Md.Sukel Ali
Mar 24 at 6:02
Can you update your web.php code here ?
– Md.Sukel Ali
Mar 24 at 6:02
Route::get('/login', 'controller@login'); the web.php code looks like this
– hekmat
Mar 24 at 6:05
Route::get('/login', 'controller@login'); the web.php code looks like this
– hekmat
Mar 24 at 6:05
Update your question with web.php and controller login method code
– keizah
Mar 24 at 6:08
Update your question with web.php and controller login method code
– keizah
Mar 24 at 6:08
Yes, thats wrong .. you should change the name of the controller "controller" to a specific name like: "ArticleController"
– rook99
Mar 24 at 6:09
Yes, thats wrong .. you should change the name of the controller "controller" to a specific name like: "ArticleController"
– rook99
Mar 24 at 6:09
@keizah updated, i dont think that would be the problem.
– hekmat
Mar 24 at 6:16
@keizah updated, i dont think that would be the problem.
– hekmat
Mar 24 at 6:16
|
show 3 more comments
1 Answer
1
active
oldest
votes
public function login()
return view('login');
view accepts the view name not the path of the route, If you want go to any route use redirect("/route_name") . But in your case if you redirect to login route again it will throw exception because the login route again calls this function. so you need to pass the view name. for example:
if your login view is in
resources
- views
-login.blade.php
then use above code. or if the login page is in any other folder inside view
it will be like return view("foldername.login")
login in return line is the name of the blade file.
– hekmat
Mar 24 at 8:28
it was working fine, but now, if i go to any route, it shows me another page
– hekmat
Mar 24 at 8:28
what another page?? Explain please
– Avinash kumawat
Mar 24 at 8:35
i want it to go to login.blade.php which is in root directory, but it goes to another page which is stored into another folder called market and the file called index. now every url is showing me this file. i this the problem is from route (maybe its cache) because when i even remove the route (/login), it still working and showing me that page
– hekmat
Mar 24 at 8:49
Show code of your whole web.php and controller
– keizah
Mar 24 at 9:38
|
show 1 more 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%2f55321139%2flaravel-making-its-own-route-to-blade-file%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
public function login()
return view('login');
view accepts the view name not the path of the route, If you want go to any route use redirect("/route_name") . But in your case if you redirect to login route again it will throw exception because the login route again calls this function. so you need to pass the view name. for example:
if your login view is in
resources
- views
-login.blade.php
then use above code. or if the login page is in any other folder inside view
it will be like return view("foldername.login")
login in return line is the name of the blade file.
– hekmat
Mar 24 at 8:28
it was working fine, but now, if i go to any route, it shows me another page
– hekmat
Mar 24 at 8:28
what another page?? Explain please
– Avinash kumawat
Mar 24 at 8:35
i want it to go to login.blade.php which is in root directory, but it goes to another page which is stored into another folder called market and the file called index. now every url is showing me this file. i this the problem is from route (maybe its cache) because when i even remove the route (/login), it still working and showing me that page
– hekmat
Mar 24 at 8:49
Show code of your whole web.php and controller
– keizah
Mar 24 at 9:38
|
show 1 more comment
public function login()
return view('login');
view accepts the view name not the path of the route, If you want go to any route use redirect("/route_name") . But in your case if you redirect to login route again it will throw exception because the login route again calls this function. so you need to pass the view name. for example:
if your login view is in
resources
- views
-login.blade.php
then use above code. or if the login page is in any other folder inside view
it will be like return view("foldername.login")
login in return line is the name of the blade file.
– hekmat
Mar 24 at 8:28
it was working fine, but now, if i go to any route, it shows me another page
– hekmat
Mar 24 at 8:28
what another page?? Explain please
– Avinash kumawat
Mar 24 at 8:35
i want it to go to login.blade.php which is in root directory, but it goes to another page which is stored into another folder called market and the file called index. now every url is showing me this file. i this the problem is from route (maybe its cache) because when i even remove the route (/login), it still working and showing me that page
– hekmat
Mar 24 at 8:49
Show code of your whole web.php and controller
– keizah
Mar 24 at 9:38
|
show 1 more comment
public function login()
return view('login');
view accepts the view name not the path of the route, If you want go to any route use redirect("/route_name") . But in your case if you redirect to login route again it will throw exception because the login route again calls this function. so you need to pass the view name. for example:
if your login view is in
resources
- views
-login.blade.php
then use above code. or if the login page is in any other folder inside view
it will be like return view("foldername.login")
public function login()
return view('login');
view accepts the view name not the path of the route, If you want go to any route use redirect("/route_name") . But in your case if you redirect to login route again it will throw exception because the login route again calls this function. so you need to pass the view name. for example:
if your login view is in
resources
- views
-login.blade.php
then use above code. or if the login page is in any other folder inside view
it will be like return view("foldername.login")
answered Mar 24 at 7:56
Avinash kumawatAvinash kumawat
472416
472416
login in return line is the name of the blade file.
– hekmat
Mar 24 at 8:28
it was working fine, but now, if i go to any route, it shows me another page
– hekmat
Mar 24 at 8:28
what another page?? Explain please
– Avinash kumawat
Mar 24 at 8:35
i want it to go to login.blade.php which is in root directory, but it goes to another page which is stored into another folder called market and the file called index. now every url is showing me this file. i this the problem is from route (maybe its cache) because when i even remove the route (/login), it still working and showing me that page
– hekmat
Mar 24 at 8:49
Show code of your whole web.php and controller
– keizah
Mar 24 at 9:38
|
show 1 more comment
login in return line is the name of the blade file.
– hekmat
Mar 24 at 8:28
it was working fine, but now, if i go to any route, it shows me another page
– hekmat
Mar 24 at 8:28
what another page?? Explain please
– Avinash kumawat
Mar 24 at 8:35
i want it to go to login.blade.php which is in root directory, but it goes to another page which is stored into another folder called market and the file called index. now every url is showing me this file. i this the problem is from route (maybe its cache) because when i even remove the route (/login), it still working and showing me that page
– hekmat
Mar 24 at 8:49
Show code of your whole web.php and controller
– keizah
Mar 24 at 9:38
login in return line is the name of the blade file.
– hekmat
Mar 24 at 8:28
login in return line is the name of the blade file.
– hekmat
Mar 24 at 8:28
it was working fine, but now, if i go to any route, it shows me another page
– hekmat
Mar 24 at 8:28
it was working fine, but now, if i go to any route, it shows me another page
– hekmat
Mar 24 at 8:28
what another page?? Explain please
– Avinash kumawat
Mar 24 at 8:35
what another page?? Explain please
– Avinash kumawat
Mar 24 at 8:35
i want it to go to login.blade.php which is in root directory, but it goes to another page which is stored into another folder called market and the file called index. now every url is showing me this file. i this the problem is from route (maybe its cache) because when i even remove the route (/login), it still working and showing me that page
– hekmat
Mar 24 at 8:49
i want it to go to login.blade.php which is in root directory, but it goes to another page which is stored into another folder called market and the file called index. now every url is showing me this file. i this the problem is from route (maybe its cache) because when i even remove the route (/login), it still working and showing me that page
– hekmat
Mar 24 at 8:49
Show code of your whole web.php and controller
– keizah
Mar 24 at 9:38
Show code of your whole web.php and controller
– keizah
Mar 24 at 9:38
|
show 1 more 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%2f55321139%2flaravel-making-its-own-route-to-blade-file%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
Can you update your web.php code here ?
– Md.Sukel Ali
Mar 24 at 6:02
Route::get('/login', 'controller@login'); the web.php code looks like this
– hekmat
Mar 24 at 6:05
Update your question with web.php and controller login method code
– keizah
Mar 24 at 6:08
Yes, thats wrong .. you should change the name of the controller "controller" to a specific name like: "ArticleController"
– rook99
Mar 24 at 6:09
@keizah updated, i dont think that would be the problem.
– hekmat
Mar 24 at 6:16