/** * @param Request $request * @return \Illuminate\Http\RedirectResponse */ public function batchInvite(Request $request) { $entries = $this->entry->notAccepted($request->get('amount', 50)); foreach ($entries as $entry) { $this->entry->invite($entry); } return redirect()->route('admin.entry.entry.index')->with('success', 'Invites sent.'); }
public function addToOrganisation($token, GithubUsernameRequest $request) { $entry = $this->entry->findByEmail($request->get('email')); if (!$entry) { return redirect()->back()->withInput()->with('error', 'No Entry found with this email.'); } if (!$this->isValidEntry($token, $entry)) { return redirect()->back()->withInput()->with('error', 'Not a valid submission.'); } $this->githubService->addTeamMember($request->get('username')); $this->markActivationAsCompleted($token, $entry); $this->sendConfirmationEmail($entry); return redirect()->back()->with('success', 'You\'have been invited to the AsgardCms Github Organisation.'); }
public function subscribe(SubscribeRequest $request) { $this->entry->subscribe($request->email); return Response::json('Thank you! You have successfully applied for beta access.'); }
public function compose(View $view) { $view->with('entries', $this->entryRepository->allActive()); }
/** * Get the widget data to send to the view * @return array */ protected function data() { return ['entriesAmount' => $this->entry->countAll()]; }
public function like(Request $request) { $entry = $this->entry->find($request->get('entryId')); return response()->json($entry->incrementLikesForIp($request->ip())); }
/** * Remove the specified resource from storage. * * @param Entry $entry * @return Response */ public function destroy(Entry $entry) { $this->entry->destroy($entry); flash()->success(trans('core::core.messages.resource deleted', ['name' => trans('entry::entries.title.entries')])); return redirect()->route('admin.entry.entry.index'); }
/** * Get the widget data to send to the view * @return array */ protected function data() { return ['totalAcceptedAndCompleted' => $this->entry->countAcceptedAndCompleted(), 'totalAcceptedAndNotCompleted' => $this->entry->countAcceptedAndNotCompleted(), 'totalNotInvited' => $this->entry->countTotalNotInvited()]; }
public function beta() { $user = $this->auth->check(); $entry = $this->entry->findByEmail($user->email); return view('profile::public.beta-access', compact('user', 'entry')); }
public function compose(View $view) { //dd($this->entry->mostPopular(5)); $view->with('popularEntries', $this->entry->mostPopular(5)); }