/** * Decide if the item should be active. * * @return null */ public function checkActiveStatus() { $path = ltrim(parse_url($this->url(), PHP_URL_PATH), '/'); $requestPath = Request::path(); if ($this->builder->config['rest_base']) { $base = is_array($this->builder->config['rest_base']) ? implode('|', $this->builder->config['rest_base']) : $this->builder->conf['rest_base']; list($path, $requestPath) = preg_replace('@^(' . $base . ')/@', '', [$path, $requestPath], 1); } if ($this->url() == Request::url() || $this->url() == \URL::secure(Request::path())) { $this->activate(); } }
<div class="col-sm-8 col-sm-offset-2"> <div id="disclosure_text" class="well well-sm text-info"> {{ get_disclosure_text(true) }} <div class="text-center hide"> By accepting our Terms you agree that you have read, understand, and accept <br/> the disclosure described above and our <a href="/privacypolicy" onclick="LoadStep('/privacypolicy'); return false;">Privacy Policy</a> <br/> </div> @include('disclosureagreebtn') <div class="gottaagreetho hide"><div class="alert alert-danger">You must agree to these terms to continue.</div></div> </div> </div> </div> <?php $encrypted = Crypt::encrypt(URL::secure(URL::full())); ?> <input type="hidden" name="rd" value="{{ $encrypted }}"> </form> @if (Session::get('accepted_disclosure')) <script> jQuery('#disclosure_display_box').addClass('hide'); </script> @endif
}); Route::group(array('domain' => '{user}.myapp.dev'), function () { Route::get('profile/{page}', function ($user, $page) { }); }); Route::get('/current/url', function () { return URL::full(); }); Route::get('yolo', function () { return Redirect::to('froyo'); }); Route::get('froyo', function () { return URL::previous(); }); Route::get('linky', function () { return URL::secure('another/source', array('foo', 'bar')); }); Route::get('the/{first}/avenger/{second}', array('as' => 'ironman', function ($first, $second) { return "tony stark, the {$first} avenger {$second}"; })); Route::get('marvel', function () { return URL::route('ironman', array('best', 'ever')); }); class Stark extends BaseController { public function tony($whatIsTony) { return 'you can count on me, to pleasure myself'; } } Route::get('tony/the/{first}/genious/{lastone}', 'Stark@tony');