本文整理汇总了PHP中app\Profile::latest方法的典型用法代码示例。如果您正苦于以下问题:PHP Profile::latest方法的具体用法?PHP Profile::latest怎么用?PHP Profile::latest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\Profile
的用法示例。
在下文中一共展示了Profile::latest方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
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']);