Experiences 

[Guest post] Why I Decided To Embrace Laravel – Oleksii Rytov

Over the last year, I took part in three large projects. My task was to move away from the old architecture based on PHP and server-side HTML generation, and transition to REST API. With the old approach, back-end developers were expected to know much more about the UI and visual aspects of the application. Because of this, they had to pay attention to different segments of the application, instead of focusing on their primary objective. Having the back-end API strictly separated from the UI allowed our developers to focus on…

Read More
Codeware 

Catch TokenMismatchException thrown by VerifyCsrfToken in Laravel

If you are using Laravel 5, you must have come across something like this when a form wasn’t after a long period of time of opening the page.   This was meant to help with checking against CSRF but it can be really annoying seeing this. Most of your user/visitors don’t understand the gibberish written, and you can’t possibly tell them to always submit the forms on time. No, you just can’t. Neither should you assume that they will only be visiting your website/app at the time they are on the…

Read More
Codeware 

Bind multiple models to a form in Laravel 5 and validate it

Form model binding in Laravel 5 makes the programmers’ live easier, no doubt. But what if you want to bind multiple models to a form? This is not straight forward but it’s not so complex either. (May be it was till I cracked it) Follow the steps below and you should be okay. Note: I am assuming that there is a one on one relationship between the models you are binding. Form model binding works if you have Laravel Collective’s Form & HTML package installed in your project.   Creating the…

Read More
RecyclerView was introduced with Android Lollipop Codeware 

How to prevent Android’s RecyclerView from recycling views

The RecyclerView widget, alongside the CardView widget, was introduced in Android API 21 (Lollipop). RecyclerView is a more flexible and more advanced version of ListView, according to Android developers’ website. But don’t read flexible as easier to implement. It’s cool though. yeah, it’s ListView on steroids. One of its key feature is that it recycles views that are out of device screen. It is a cool feature but it’s not always a good thing. There are times you don’t really want to recycle views. Or when recycling messes up your display.…

Read More
Codeware 

How to create custom helper functions in Laravel 5

Creating simple PHP helper functions in Laravel 5 is not really something that comes out of the box, unlike what is obtained in CodeIgniter. This is one of the very few things I initially missed when I switched from CodeIgniter to Laravel. However, there is a short solution. This might not necessarily be in compliance with Laravel’s best practices, but I kinda like it. Besides, it’s pretty straight forward. Follow these three steps and you are good to go. 1. Create a Helper’s folder Go to your app folder, create…

Read More
%d bloggers like this: