I don't know if you could do that with any less code. Sometimes we forget how short that code actually is. Imagine writing what you just did in three lines of code with Laravel, than what you would have needed to do in native PHP.
@pickupman thank you for Your answer. Even that I am using Laravel for some time, I am still learning and feel like a newbie :) Maybe it's because Laravel presented me PHP in a very easy to learn way. I couldn't convince myself to native PHP. Anyway, thanks again for reply.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community