Skip to content

Applying suggestion in #545 on creating instance of action class #547

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/Http/Middleware/NotifyAboutEvaluation.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ public function handle(Request $request, Closure $next)
&& $user->isCollegist(alumni: false)
&& $user->getStatus(Semester::next()) == null
// this is non-static, but actually, the controller contains nothing;
// so it will be fine this way
&& (new SemesterEvaluationController())->isActive()
// so it will be to construct an instance,
// and app(...) does this
&& app(SemesterEvaluationController::class)->isActive()
) {
$request->session()->flash('message', 'Töltsd ki a szemeszter végi kérdőívet a profilod alatt!');
}
Expand Down