php - laravel redirection to splash page during testing -


I've spent hours with it

I'm just starting with Larwell, a new project I I want to be able to create a system where a certain user can access the site during the development of the site. The rest of the public is sent to the Splash page. I plan to make a secret path which sets the toggle in session. If this toggle is set then the user can use the entire system. Otherwise, they are redirected to the Splash page.

The problem is that I can not redirect it. I bootstrap-> The standard

  header ('Location: www.thesite.com') is adding code to the start.php file   

Starting strange things that I Do not understand.

If I return to

 : to (htmlspecialchars_decode ($ url))   

returns this error:

  BadMethodCallException method [run] does not exist on redirection.   

I do not know exactly what's going on or how to fix it. Why is redirection script returning an error? Do not start.php is the right place? If so, how can he achieve his purpose within the larahle?

Filter this in your / code> app / filter.fp :

  App :: before (function ($ request) {if (! $ Request- & gt; ('splash') & amp; input: get ('allow' )! = '1') {Return from Direct :: ('/ Splash');});   

Where / splash is your splash screen path, then you can bypass the splash screen by http://www.example.com?allow= 1 .

Before filter is a function that is run before each other in your application.

Let me know that it works for you!

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -