public function index(Request $request)
{
$data = $request->except('_token');
User::create($data);
}
$email = $request->post('email');
$users = User::where('is_deleted', '0')
->with(['langs', 'categories'])
->where('is_published', true)
->where('subscription', '>=', now())
->orderBy('balls', 'DESC')
->filter($filters)
->paginate(15);
foreach ($users as $user) {
if ($user->top_date > Carbon::now()) {
$users = $users->sort(function ($user) {
return $user->top_date;
});
break;
}
}
return $users;
<post-item v-for="(item) in items" :item="item"></post-item>