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

Obelisk of Theodosius Contents History Description Notes Bibliography Further reading External links Navigation menuAge of spirituality : late antique and early Christian art, third to seventh centuryOver 60 picturesObelisks of the World41°00′21.24″N 28°58′31.43″E / 41.0059000°N 28.9753972°E / 41.0059000; 28.97539727724550-7235741376235741376

밀양 대씨 역사 각주 함께 보기 둘러보기 메뉴밀양 대씨

1973년 목차 사건 문화 탄생 사망 노벨상 달력 둘러보기 메뉴