/** * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function settings() { $this->breadcrumb->push('Moje konto', route('user.home')); $this->breadcrumb->push('Ustawienia powiadomień', route('user.alerts.settings')); $settings = Setting::select(['alert_settings.*', 'alert_types.name'])->join('alert_types', 'alert_types.id', '=', 'type_id')->where('user_id', auth()->user()->id)->get(); return parent::view('user.alerts.settings', compact('settings')); }
/** * @return $this */ public function index() { $this->breadcrumb->push('Moje konto', route('user.home')); $this->breadcrumb->push('Umiejętności', route('user.skills')); $skills = User\Skill::where('user_id', auth()->user()->id)->orderBy('order')->get(); return parent::view('user.skills.home')->with('skills', $skills); }
/** * @return \Illuminate\Http\Response */ public function index() { $this->breadcrumb->push('Moje konto', route('user.home')); $this->breadcrumb->push('Ustawienia', route('user.settings')); $groupList = [null => '-- wybierz --'] + Group\User::groupList(auth()->user()->id)->toArray(); $actEmail = Actkey::where('user_id', auth()->user()->id)->pluck('email'); return parent::view('user.settings', ['formatList' => User::dateFormatList(), 'yearList' => User::birthYearList(), 'groupList' => $groupList, 'actEmail' => $actEmail]); }
/** * @param $id * @param Microblog $repository * @return $this */ public function index($id, Microblog $repository) { $microblog = $repository->findOrFail($id); $excerpt = excerpt($microblog->text); $this->breadcrumb->push('Mikroblog', route('microblog.home')); $this->breadcrumb->push($excerpt, route('microblog.view', [$microblog->id])); $microblog->text = app()->make('Parser\\Microblog')->parse($microblog->text); $parser = app()->make('Parser\\Comment'); foreach ($microblog->comments as &$comment) { $comment->text = $parser->parse($comment->text); } return parent::view('microblog.view')->with(['microblog' => $microblog, 'excerpt' => $excerpt]); }
/** * @param Request $request * @return $this */ public function index(Request $request) { $this->breadcrumb->push('Forum', route('forum.home')); $this->pushForumCriteria(); // execute query: get all categories that user can has access $sections = $this->forum->groupBySections(auth()->id(), $request->session()->getId()); // let's cache tags. we don't need to run this query every time $tags = Cache::remember('forum:tags', 60 * 24, function () { return $this->forum->getTagClouds(); }); // create view with online users $viewers = app()->make('Session\\Viewers')->render($request->getRequestUri()); return parent::view('forum.home')->with(compact('sections', 'viewers', 'tags')); }
/** * @param \Coyote\Forum $forum * @param Request $request * @return $this */ public function index($forum, Request $request) { // builds breadcrumb for this category $this->breadcrumb($forum); // create view with online users $viewers = app()->make('Session\\Viewers')->render($request->getRequestUri()); $this->pushForumCriteria(); $forumList = $this->forum->forumList(); $this->topic->pushCriteria(new BelongsToForum($forum->id)); $topics = $this->topic->paginate(auth()->id(), $request->getSession()->getId()); // let's cache tags. we don't need to run this query every time $tags = Cache::remember('forum:tags', 60 * 24, function () { return $this->forum->getTagClouds(); }); return parent::view('forum.category')->with(compact('viewers', 'forumList', 'forum', 'topics', 'tags')); }
/** * @return \Illuminate\View\View */ public function index(UserRepositoryInterface $user) { $this->breadcrumb->push('Moje konto', route('user.home')); $sessions = Session::where('user_id', auth()->user()->id)->get(); $browsers = ['OPR' => 'Opera', 'Firefox' => 'Firefox', 'MSIE' => 'MSIE', 'Trident' => 'MSIE', 'Opera' => 'Opera', 'Chrome' => 'Chrome']; foreach ($sessions as &$row) { $browser = 'unknown'; foreach ($browsers as $item => $name) { if (stripos($row['browser'], $item) !== false) { $browser = $name; break; } } $row['browser'] = $browser; } return parent::view('user.home', ['rank' => $user->rank(auth()->user()->id), 'total_users' => $user->countUsersWithReputation(), 'ip' => request()->ip(), 'sessions' => $sessions]); }
public function submit($forum, $topic, $post = null) { // make sure that user can write in this category $this->authorizeForum($forum); $this->breadcrumb($forum); $this->breadcrumb->push($topic->subject, route('forum.topic', [$forum->path, $topic->id, $topic->path])); if ($post === null) { $this->breadcrumb->push('Odpowiedz', request()->path()); $title = 'Napisz odpowiedź w wątku ' . $topic->subject; } else { // make sure user can edit this post $this->authorize('update', [$post, $forum]); $this->breadcrumb->push('Edycja', request()->path()); $title = 'Edycja posta'; } $tags = $topic->tags->pluck('name')->toArray(); return parent::view('forum.submit')->with(compact('forum', 'topic', 'post', 'title', 'tags')); }
/** * @return \Illuminate\View\View */ public function index() { $microblogs = $this->microblog->paginate(10); $this->microblog->resetCriteria(); // let's cache microblog tags. we don't need to run this query every time $tags = Cache::remember('microblog:tags', 30, function () { return $this->microblog->getTags(); }); // we MUST NOT cache popular entries because it may contains current user's data $popular = $this->microblog->takePopular(5); $parser = ['main' => app()->make('Parser\\Microblog'), 'comment' => app()->make('Parser\\Comment')]; foreach ($microblogs->items() as &$microblog) { $microblog->text = $parser['main']->parse($microblog->text); foreach ($microblog->comments as &$comment) { $comment->text = $parser['comment']->parse($comment->text); } } return parent::view('microblog.home', ['count' => $this->microblog->count(), 'count_user' => $this->microblog->countForUser(), 'pagination' => $microblogs->render(), 'microblogs' => $microblogs->items(), 'route' => request()->route()->getName()])->with(compact('tags', 'popular')); }
/** * Formularz generuje link umozliwiajacy reset hasla * * @return \Illuminate\View\View */ public function getIndex() { $this->breadcrumb->push('Odzyskiwanie hasła', '/Password'); return parent::view('auth.password'); }
/** * @return \Illuminate\Http\Response */ public function index() { $this->breadcrumb->push('Moje konto', route('user.home')); $this->breadcrumb->push('Zmiana hasła', route('user.password')); return parent::view('user.password'); }
/** * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function submit() { $this->breadcrumb->push('Wiadomości prywatne', route('user.pm')); $this->breadcrumb->push('Napisz wiadomość', route('user.pm.submit')); return parent::view('user.pm.submit'); }
/** * @return \Illuminate\View\View */ public function index() { $this->breadcrumb->push('Praca', route('job.home')); $this->breadcrumb->push('Lorem ipsum', route('job.offer')); return parent::view('job.offer'); }
/** * @return \Illuminate\Http\Response */ public function index() { $this->breadcrumb->push('Rejestracja', '/register'); return parent::view('auth.register'); }
/** * @param \Coyote\User $user * @return \Illuminate\View\View */ public function index($user) { $this->breadcrumb->push('Profil: ' . $user->name, route('profile', ['user' => 1])); return parent::view('profile.home')->with(['user' => $user, 'rank' => $this->user->rank($user->id), 'total_users' => $this->user->countUsersWithReputation()]); }
/** * @return $this */ public function index() { $this->breadcrumb->push('Moje konto', route('user.home')); $this->breadcrumb->push('Bezpieczeństwo', route('user.security')); return parent::view('user.security'); }
/** * @return \Illuminate\Http\Response */ public function index() { $this->breadcrumb->push('Potwierdź adres e-mail', route('user.confirm')); return parent::view('user.confirm'); }
/** * Widok formularza logowania * * @return \Illuminate\Http\Response */ public function index() { $this->breadcrumb->push('Logowanie', route('login')); request()->session()->put('url.intended', request()->headers->get('referer')); return parent::view('auth.login'); }
/** * @param Forum $forum * @return \Illuminate\View\View */ public function submit($forum) { // make sure that user can write in this category $this->authorizeForum($forum); $this->breadcrumb($forum); $this->breadcrumb->push('Nowy wątek', route('forum.topic.submit', [$forum->path])); return parent::view('forum.submit', ['title' => 'Nowy wątek na ' . $forum->name])->with('forum', $forum); }