You could use Route::controller('profile', 'UsersProfileController'), though you'll have to change your method names to getDetails, postDetails, getPositions, postPositions, etc.
Aaaah I didn't think that was the right to do it. Much better though, think I was looking Route::resource for create, update, store etc. Thanks.
I think it's better to define every route and to avoid your routes.php file getting bloated you can create a folder called routes with a file in it called profile.php and then include it in routes.php
Just basic PHP ;)
zenry said:
I think it's better to define every route and to avoid your routes.php file getting bloated you can create a folder called
routeswith a file in it calledprofile.phpand then include it inroutes.phpJust basic PHP ;)
Yep, sometimes it pays to remember that Laravel is, under the hood, just PHP! ;)
Thanks guys, very helpful for my first post. I guess, as I've learnt with Laravel, there isn't necessarily a right or wrong way of doing things - just many great ways :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.