naekobest
3 months ago
237
1
Laravel

Routing Question

Posted 3 months ago by naekobest

Hello! I dont know how to get forward with my problem.

I have 2 careers options "mD" and "gD".

My view layout, for lets say "exam", is for each of the careers the same, only the input/output coming from my database does change for each career. So "mD" has different exams than "gD" has.

Now i want to seperate both like so

domain.com/md

domain.com/gd

I currently have my navigation setup like so

@if (\Request::is('md'))
--- navbar for md here ---
@elseif(\Request::is('gd'))
--- navbar for gd here ---

this actually work just fine, but here is my problem, how do i seperate my exam for each career, like;

domain.com/md/exam

domain.com/gd/exam

with only one view for exam

Please sign in or create an account to participate in this conversation.