Laravel Route redirect with prefix and optional parameterHow to manage a redirect request after a jQuery Ajax callHow do I redirect to another webpage?Redirect stderr and stdout in BashHow do I make a redirect in PHP?How can I redirect and append both stdout and stderr to a file with Bash?How do I redirect with JavaScript?Amazon S3 Redirect and CloudfrontRedirect to Another Symfony Route from FilterControllerEvent Listenerlaravel middleware almost always redirectsLaravel Auth routing redirects back

The qvolume of an integer

Expenditure in Poland - Forex doesn't have Zloty

What F1 in name of seeds/varieties means?

Is it possible to kill all life on Earth?

Why would Lupin kill Pettigrew?

What is game ban VS VAC ban in steam?

Boots: Does light damage affect waterproofing?

Mother abusing my finances

Infinitely many hats

Where can I find the list of all tendons in the human body?

Differences between “pas vrai ?”, “c’est ça ?”, “hein ?”, and “n’est-ce pas ?”

How to capture more stars?

Mapping a function f[xi_,xj_] over a list x1, ...., xn with the i < j restriction

Preserving culinary oils

Can you move on your turn, and then use the Ready Action to move again on another creature's turn?

Can I install a row of bricks on a slab to support a shed?

How does one "dump" or deplete propellant without changing spacecraft attitude or trajectory?

Creating Fictional Slavic Place Names

What is the difference between nullifying your vote and not going to vote at all?

Writing the notation when gates act on non successive registers

Thousands and thousands of words

What does the word 「ごねだした」 mean?

Strange math syntax in old basic listing

Why is there a need to modify system call tables in linux?



Laravel Route redirect with prefix and optional parameter


How to manage a redirect request after a jQuery Ajax callHow do I redirect to another webpage?Redirect stderr and stdout in BashHow do I make a redirect in PHP?How can I redirect and append both stdout and stderr to a file with Bash?How do I redirect with JavaScript?Amazon S3 Redirect and CloudfrontRedirect to Another Symfony Route from FilterControllerEvent Listenerlaravel middleware almost always redirectsLaravel Auth routing redirects back






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I have setup a location system on my Laravel, when I try to redirect a page (as it has now been moved) I am getting the value of the language into a framedmode variable which shouldn't be happening. If I add the locale into the redirection it then complains about the number of parameters.



Route::prefix('locale')->group(function () 
Route::get('Reports/ChargeabilityTarget/FrameMode?', function($FrameMode)
return redirect()->route('Reports.ChargeabilityTargetDash', ['Locale'=>locale()->current(), 'FrameMode'=>$FrameMode]);
);
Route::get('Reports/Charge/ChargeabilityTarget/FrameMode?', 'ReportsController@ChargeabilityTargetDash')
->name('Reports.ChargeabilityTargetDash');
);


What I have tried so far:



  • Not passing Locale in the redirect (laravel error not enough arguments)

  • Passing in $Locale into the function() redirect (Laravel error too many arguments passed)

  • Passing the value of locale as locale (didn't work)

  • Passing the value of locale as Locale (didn't work)









share|improve this question






















  • I never tried making prefix dynamic but if you add one more value to prefix then i think it will work something like this prefix('some_value/locale')

    – ViperTecPro
    Mar 26 at 11:01

















0















I have setup a location system on my Laravel, when I try to redirect a page (as it has now been moved) I am getting the value of the language into a framedmode variable which shouldn't be happening. If I add the locale into the redirection it then complains about the number of parameters.



Route::prefix('locale')->group(function () 
Route::get('Reports/ChargeabilityTarget/FrameMode?', function($FrameMode)
return redirect()->route('Reports.ChargeabilityTargetDash', ['Locale'=>locale()->current(), 'FrameMode'=>$FrameMode]);
);
Route::get('Reports/Charge/ChargeabilityTarget/FrameMode?', 'ReportsController@ChargeabilityTargetDash')
->name('Reports.ChargeabilityTargetDash');
);


What I have tried so far:



  • Not passing Locale in the redirect (laravel error not enough arguments)

  • Passing in $Locale into the function() redirect (Laravel error too many arguments passed)

  • Passing the value of locale as locale (didn't work)

  • Passing the value of locale as Locale (didn't work)









share|improve this question






















  • I never tried making prefix dynamic but if you add one more value to prefix then i think it will work something like this prefix('some_value/locale')

    – ViperTecPro
    Mar 26 at 11:01













0












0








0


1






I have setup a location system on my Laravel, when I try to redirect a page (as it has now been moved) I am getting the value of the language into a framedmode variable which shouldn't be happening. If I add the locale into the redirection it then complains about the number of parameters.



Route::prefix('locale')->group(function () 
Route::get('Reports/ChargeabilityTarget/FrameMode?', function($FrameMode)
return redirect()->route('Reports.ChargeabilityTargetDash', ['Locale'=>locale()->current(), 'FrameMode'=>$FrameMode]);
);
Route::get('Reports/Charge/ChargeabilityTarget/FrameMode?', 'ReportsController@ChargeabilityTargetDash')
->name('Reports.ChargeabilityTargetDash');
);


What I have tried so far:



  • Not passing Locale in the redirect (laravel error not enough arguments)

  • Passing in $Locale into the function() redirect (Laravel error too many arguments passed)

  • Passing the value of locale as locale (didn't work)

  • Passing the value of locale as Locale (didn't work)









share|improve this question














I have setup a location system on my Laravel, when I try to redirect a page (as it has now been moved) I am getting the value of the language into a framedmode variable which shouldn't be happening. If I add the locale into the redirection it then complains about the number of parameters.



Route::prefix('locale')->group(function () 
Route::get('Reports/ChargeabilityTarget/FrameMode?', function($FrameMode)
return redirect()->route('Reports.ChargeabilityTargetDash', ['Locale'=>locale()->current(), 'FrameMode'=>$FrameMode]);
);
Route::get('Reports/Charge/ChargeabilityTarget/FrameMode?', 'ReportsController@ChargeabilityTargetDash')
->name('Reports.ChargeabilityTargetDash');
);


What I have tried so far:



  • Not passing Locale in the redirect (laravel error not enough arguments)

  • Passing in $Locale into the function() redirect (Laravel error too many arguments passed)

  • Passing the value of locale as locale (didn't work)

  • Passing the value of locale as Locale (didn't work)






redirect laravel-5.7






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 24 at 9:51









NeoNeo

1,40532654




1,40532654












  • I never tried making prefix dynamic but if you add one more value to prefix then i think it will work something like this prefix('some_value/locale')

    – ViperTecPro
    Mar 26 at 11:01

















  • I never tried making prefix dynamic but if you add one more value to prefix then i think it will work something like this prefix('some_value/locale')

    – ViperTecPro
    Mar 26 at 11:01
















I never tried making prefix dynamic but if you add one more value to prefix then i think it will work something like this prefix('some_value/locale')

– ViperTecPro
Mar 26 at 11:01





I never tried making prefix dynamic but if you add one more value to prefix then i think it will work something like this prefix('some_value/locale')

– ViperTecPro
Mar 26 at 11:01












0






active

oldest

votes












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%2f55322528%2flaravel-route-redirect-with-prefix-and-optional-parameter%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















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%2f55322528%2flaravel-route-redirect-with-prefix-and-optional-parameter%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

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

용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해