Level 20
Use a middleware.
If true, go further with the request, else redirect
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,
I need to integrate forum (SMF) with my Laravel application and I need to check custom condition for forum access/ It's should looks like this:
if (hasAccessToForum) {
// use forum directory
} else {
// return view(...);
}
How can I do this?
Please or to participate in this conversation.