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;








0















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!










share|improve this question
























  • 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

















0















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!










share|improve this question
























  • 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













0












0








0








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!










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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

















  • 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












1 Answer
1






active

oldest

votes


















0














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")






share|improve this answer























  • 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











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
);



);













draft saved

draft discarded


















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









0














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")






share|improve this answer























  • 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















0














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")






share|improve this answer























  • 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













0












0








0







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")






share|improve this answer













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")







share|improve this answer












share|improve this answer



share|improve this answer










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

















  • 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



















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현