示例#1
0
Route::post('activate/FirstLink', ['as' => '1stlinkactivation', 'uses' => 'CodeController@activateFirstLink']);
// after first link is activated dont show anymore this url to them
Route::post('signup', ['as' => 'signup', 'uses' => 'Auth\\AuthController@create']);
// Route::get('{link?}', ['as' => 'links', 'uses' => 'LinkController@getRefLink']);
Route::get('activeSponsor/{id}', function ($id) {
    $id = App\Link::where('id', $id)->firstOrFail()->activeSponsor($id);
    return $id;
});
// Route::get('code/all', ['as' => 'codeall', 'uses' => 'CodeController@index']);
Route::get('code/{linkID}/{PINCODE}', ['as' => 'code', 'uses' => 'CodeController@attachLink']);
// Update user account data
// Route::put('profile', ['as' => 'profile/update', 'uses' => 'UserController@update']); // Not working yet
Route::get('/vue', function () {
    return view('vue');
});
Route::get('api/users', function () {
    $value = Cache::rememberForever('users', function () {
        return \App\Profile::latest()->take(50)->select('display_name', 'created_at')->get();
        // Should Only Fetch the Users Display Name!
    });
    return $value = Cache::pull('users');
});
//Route::post('api/users', function(){
//	 App\User::create(Request::all());
//});
//
Route::get('getCookie', function () {
    return view('welcome');
});
//Route::get('/activate/{code}', 'Auth\AuthController@activateAccount
Route::get('{link?}', ['as' => 'reflink', 'uses' => 'LinkController@showRefLink']);