Route::any('check/purchase-code', function() {if ($code = \Input::get('code')) {ini_set('user_agent', 'Mozilla/5.0');$result = file_get_contents("http://example.com/demo/install/check?code=".$code.'&domain='.\Request::server('HTTP_HOST'));if ($result == 1) {\Session::put('valid-usage','1');return \Redirect::route('install-db-info');}}return \Redirect::to('/install');}); Route::filter('user-auth', function() { if (!Auth::check()) { if (Request::ajax()) { return json_encode(['content' => 'login']); } else { return Redirect::guest('/'); } }; /** * User is login we need to know if user has getstarted or not */ if (Config::get('user-getstarted')) { if (Auth::user()->fully_started != 1 and !Request::ajax()) { return \Redirect::route('user.getstarted'); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)